Re: Why does a simple query not use an obvious index?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Why does a simple query not use an obvious index?
Дата
Msg-id 20040830194050.GA1862@wolff.to
обсуждение исходный текст
Ответ на Re: Why does a simple query not use an obvious index?  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
Список pgsql-performance
On Mon, Aug 30, 2004 at 21:21:26 +0200,
  Pierre-Frédéric Caillaud <lists@boutiquenumerique.com> wrote:
> >>Also, count(*) is likely to always generate a seq scan due to the way
> >>aggregates are implemented currently in pgsql.  you might want to try:
>
>
>     By the way, in an ideal world, count(*) should only read the index
>     on the  timetamp column, not the rows. I guess this is not the case. Would
> this be  an useful optimization ?

It's in the archives. The short answer is that no, postgres has to check
the heap to check tuple visibility to the current transaction.

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

Предыдущее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: Why does a simple query not use an obvious index?
Следующее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: seqscan instead of index scan