Re: COUNT(*) and index-only scans

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: COUNT(*) and index-only scans
Дата
Msg-id CAA-aLv6-bWVgxLkxQKgwOFrV+CmxWtKwtFzpOOhM_fx6BWsqaQ@mail.gmail.com
обсуждение исходный текст
Ответ на COUNT(*) and index-only scans  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On 10 October 2011 18:23, Bruce Momjian <bruce@momjian.us> wrote:
> I talked to Robert Haas and he said that index-only scans do not
> optimize COUNT(*).  Is this something we can do for PG 9.2?  Is anyone
> working on this?

Yes it does, provided that there is an appropriate WHERE clause.  But
yes, I think we definitely want this if it's relatively easy.  In
addition to this, it's not always easy to get it to use an index-only
scan even if it's going to significantly faster.  I'm assuming some
supporting planner work needs to be added too.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range Types - typo + NULL string constructor
Следующее
От: Greg Stark
Дата:
Сообщение: Re: COUNT(*) and index-only scans