Hi everyone,
and thank you for reading, im sure that any assistance you may provide will be very helpful.
Im currently developing an app that is effectively a property management system. On search pages for property I have two queries:
This query executes and pulls of our list of properties.
SELECT property_short_name, property_town, property_postcode, property_id
FROM property
ORDER BY property_short_name
DESC LIMIT " . $previousPage . ",10
Now obviously im limiting it to 10 results to prevent screen flood, so i perform another query so that i can build a Page X of Y at the footer.
This query is used with mysql_num_rows() to tell me how many properties are on the system.
SELECT property_id
FROM property
The first query runs off very quickly as it is only 10 items, however the second query is taking quite a well to execute as there are a considerable amount of entries.
My question: Can anyone advise or give opinions to speeding up the second query?
Thanks,
Neil