Performance question of count()
606141Oct 31 2007 — edited Nov 1 2007We are having a heated debate in work over an existing process that I thought I would get a wider opinion on.
Currently we have a situation where a query is run that counts the number of records that match search criteria.
If the count is above a predefined limit, a message is returned to the user and no results are displayed.
If the count is below the limit the same query is run but the required results are brought back and displayed.
The argument is that the performance of counting first is negligable if a complicated query is required.
Whats the general consensus?