Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Performance question of count()

606141Oct 31 2007 — edited Nov 1 2007
We 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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2007
Added on Oct 31 2007
18 comments
946 views