Yes, I can possibly use triggers to maintanin counts of several fixed groups of records or total recordcount (but it's unpractical).
No, I can't speed-up evaluation of generic "count(*) where ()" queries this way.
My question was rather about general performance of count() queries in environment with infrequent updates.
Cestmir
----- Original Message -----
Sent: Friday, October 07, 2005 11:54 AM
Subject: Re: [PERFORM] count(*) using index scan in "query often, update rarely" environment
On 10/7/05, Cestmir Hybl <cestmirl@freeside.sk> wrote: Isn't it possible (and reasonable) for these environments to keep track of whether there is a transaction in progress with update to given table and if not, use an index scan (count(*) where) or cached value (count(*)) to perform this kind of query?
if i understand your problem correctly, then simple usage of triggers will do the job just fine.
hubert