Subject | Re: [IBO] Fastest Count |
---|---|
Author | Bill Gage |
Post date | 2005-02-18T16:16:26Z |
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.
Thanks
Bill
--- In IBObjects@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
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.
Thanks
Bill
--- In IBObjects@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
>into
> --- In IBObjects@yahoogroups.com, "Bill Gage" wrote:
> > Well our databases are so huge that we have to split them down
> > separate databases for each month.slow
>
> Oops, exactly how huge is "huge"? Counting records is generally
> in client/server databases like Firebird and should be used withcare.
> Firebird has to look up every record (to see whether it is visibleto
> the transaction that does the 'select count'). Hence, if you're(depending on
> talking about counting more than a million records or so
> lots of stuff, e.g. if you're the only user and are patient enoughto
> wait for a long time, you could do select counts on 100 millionunacceptable
> records or more, whereas counting 100000 records could be
> in a system with lots of concurrent users), you may find that youhave
> to restrict which counts should be allowed.
>
> Set