Re: Why count(*) doest use index?

Поиск
Список
Период
Сортировка
От Glenn Maynard
Тема Re: Why count(*) doest use index?
Дата
Msg-id AANLkTin_kCyR8VFGnMu2tC7OxjK+00QJ3_4FWS-cLK73@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why count(*) doest use index?  ("Igor Neyman" <ineyman@perceptron.com>)
Список pgsql-general
On Tue, Mar 8, 2011 at 10:42 AM, Igor Neyman <ineyman@perceptron.com> wrote:
Indexes don't "maintain counts", indexes maintain pointers to the table
records.

The whole point is that they don't, even if you can afford the costs.

What you need is "materialized view" storing aggregates.
And it looks like you already have it with your triggers.

With cumbersome, awkward triggers, yes.

--
Glenn Maynard

В списке pgsql-general по дате отправления:

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Using bytea field...
Следующее
От: akp geek
Дата:
Сообщение: @@ to_tsquery help