Re: COUNT(*) and index-only scans

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: COUNT(*) and index-only scans
Дата
Msg-id 4E956B3E0200002500041EAA@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: COUNT(*) and index-only scans  (Aidan Van Dyk <aidan@highrise.ca>)
Ответы Re: COUNT(*) and index-only scans
Список pgsql-hackers
Aidan Van Dyk <aidan@highrise.ca> wrote:
> The elephant in the room is that the index-only-scan really
> doesn't save a *whole* lot if the heap pages are already in shared
> buffers.
It's not hard to create a simple test case where it's about three
times slower to go to cached heap pages than to use the values from
the index.  That was just my first try, so it's not likely to be a
real "worst case", although was using the default shared_memory
size, so a lot of the heap pages probably came from the OS cache,
rather than being in shared memory.
> But it matters a *lot* when they heap pages are not in shared
> buffers
Yeah, obviously it matters more if you actually need to add a random
disk read.
-Kevin


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [BUGS] *.sql contrib files contain unresolvable MODULE_PATHNAME
Следующее
От: Greg Stark
Дата:
Сообщение: Re: COUNT(*) and index-only scans