Edward Wilson wrote:
The idea of issuing two selects is, well, a hack, and knowing how many records one has in a result-set is a powerful feature
Are you needing a progress bar for the search (ie the query?) Or some action based on the result set? If the later, get the result set as your favorite container.. ask the container the size. If its the first then a "feature" won't help. It still has to 'run' the query in order to get the count. It would be like me asking you to tell me how many red Skittles are in a package before you open it. As for being a 'hack' .. all your 'feature' would be is a pretty programming interface around that hack. As I said before, how can the database know the number of items that will be returned without first searching for them.