Subject Re: [firebird-support] Plan natural in select count()....
Author Doug Chamberlin
adrian_avila_mtz wrote:
> When I do a SELECT COUNT(ID) FROM EMPLOYEES I always get a natural plan even if I have an index for ID, how can I get fasters select count() queries?

The way to get a faster result is to combine your counting with some
other select criteria that reduces the number of records being accessed.

In response to other messages you have indicated you need to paginate
every record of a 3.6 million record table. Somehow I cannot believe you
really need to generate 100,000 or more pages. So, I suspect there is
something else you can add to the query to speed it up by selecting only
part of the table.

--
Doug C.
-----
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?