Aidan Van Dyk <ai...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to