Re: count(*) using index scan in "query often, update rarely" environment
От | Cestmir Hybl |
---|---|
Тема | Re: count(*) using index scan in "query often, update rarely" environment |
Дата | |
Msg-id | 9d5b01c5cb27$e7a1c970$131fc39e@stratos обсуждение исходный текст |
Ответ на | count(*) using index scan in "query often, update rarely" environment ("Cestmir Hybl" <cestmirl@freeside.sk>) |
Ответы |
Re: count(*) using index scan in "query often, update rarely" environment
|
Список | pgsql-performance |
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 -----To: Cestmir HyblSent: Friday, October 07, 2005 11:54 AMSubject: Re: [PERFORM] count(*) using index scan in "query often, update rarely" environmentOn 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
В списке pgsql-performance по дате отправления: