Re: count(*) using index scan in "query often, update rarely" environment - Mailing list pgsql-performance

From hubert depesz lubaczewski
Subject Re: count(*) using index scan in "query often, update rarely" environment
Date
Msg-id 9e4684ce0510080344v1dfa36f7nea19ddb1ad38f652@mail.gmail.com
Whole thread Raw
In response to Re: count(*) using index scan in "query often, update rarely" environment  ("Cestmir Hybl" <cestmirl@freeside.sk>)
List pgsql-performance
On 10/7/05, Cestmir Hybl <cestmirl@freeside.sk> wrote:
No, I can't speed-up evaluation of generic "count(*) where ()" queries this way.

no you can't speed up generic where(), *but* you can check what are the most common "where"'s (like usually i do where on one column like:
select count(*) from table where some_particular_column = 'some value';
where you can simply make the trigger aware of the fact that it should count based on value in some_particular_column.
works good enough for me not to look for alternatives.

depesz


pgsql-performance by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: [HACKERS] A Better External Sort?
Next
From: mark@mark.mielke.cc
Date:
Subject: Re: [HACKERS] A Better External Sort?