Re: Much Ado About COUNT(*)

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Much Ado About COUNT(*)
Дата
Msg-id 1105567438.690.76.camel@home
обсуждение исходный текст
Ответ на Re: Much Ado About COUNT(*)  ("Jonah H. Harris" <jharris@tvi.edu>)
Список pgsql-hackers
> >The index could then make sensible the reasonably common practice of
> >using a covered index - i.e. putting additional columns into the index
> >to satisfy the whole query just from the index.

> I am willing to take it on and I understand that the workload is mine.  
> As long as everyone gives me some suggestions, I'm good it being optional.

If nobody is working on it, you may find that the below TODO item might
accomplish most of what you're looking for as well as generally
improving performance. The count(*) on a where clause would result in
one index scan and one partial sequential heap scan. Not as fast for the
specific examples you've shown, but far better than today and covers
many other cases as well.
       Fetch heap pages matching index entries in sequential order               Rather than randomly accessing heap
pagesbased on index       entries, mark heap pages needing access in a bitmap and do the       lookups in sequential
order.Another method would be to sort       heap ctids matching the index before accessing the heap rows.
 



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

Предыдущее
От: "Jim Buttafuoco"
Дата:
Сообщение: Re: PANIC: right sibling's left-link doesn't match
Следующее
От: Mark Wong
Дата:
Сообщение: sparse (static analyzer) report