Re: count(*) using index scan in "query often, update rarely" environment

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: count(*) using index scan in "query often, update rarely" environment
Дата
Msg-id 9e4684ce0510080344v1dfa36f7nea19ddb1ad38f652@mail.gmail.com
обсуждение исходный текст
Ответ на Re: count(*) using index scan in "query often, update rarely" environment  ("Cestmir Hybl" <cestmirl@freeside.sk>)
Список 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 по дате отправления:

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: [HACKERS] A Better External Sort?
Следующее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: [HACKERS] A Better External Sort?