Subject Re: [ib-support] How Do I count faster?
Author Lucas Franzen
Roque schrieb:
>
> Hi,
>
> :. What is the fastest way to count records in large tables? Or is there a
> way to count faster the records of a table?

There is no really fast way.
It doesn't really matter if you do a count(*) or a count
(primary_key_field).

Due to the multi-generational architecture of IB/FB, there's no way to
keep the record count in the table header - therefore asking for the
number of records the whole table has to be scanned.

If you have to use this quite often, you might think keeping the number
in a separate table (without mentioning the downsides this might have
furtheron...)

Sorry, that's the way it is.

Luc.