Subject Re: [IBO] Fastest Count
Author Bill Gage
FYI Svein,

I researched the suggestion of pregenerating counts and found a way
to create a prepopulated count table. I identified some of the core
groupings that occur and make counts off of those. The fortunate
thing is that the table that the counts are being based off of is
filled once when the database is created and then records are not
added or removed. So pregenerating the counts will speed things up
a bit.


--- In, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> --- In, "Bill Gage" wrote:
> > Well our databases are so huge that we have to split them down
> > separate databases for each month.
> Oops, exactly how huge is "huge"? Counting records is generally
> in client/server databases like Firebird and should be used with
> Firebird has to look up every record (to see whether it is visible
> the transaction that does the 'select count'). Hence, if you're
> talking about counting more than a million records or so
(depending on
> lots of stuff, e.g. if you're the only user and are patient enough
> wait for a long time, you could do select counts on 100 million
> records or more, whereas counting 100000 records could be
> in a system with lots of concurrent users), you may find that you
> to restrict which counts should be allowed.
> Set