Re: [PATCH] Prefetch index pages for B-Tree index scans
Cédric Villemain <cedric@2ndquadrant.com>
From: Cédric Villemain <cedric@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Cc: Claudio Freire <klaussfreire@gmail.com>,
John Lumby <johnlumby@hotmail.com>
Date: 2012-10-29T19:17:05Z
Lists: pgsql-hackers
> Ok, this is the best I could come up with, without some real test hardware. > > The only improvement I see in single-disk scenarios: > * Huge speedup of back-sequential index-only scans > * Marginal speedup on forward index-only scans (5% or less) > * No discernible difference in heap-including scans (even with heap > prefetch), but I'm pretty sure a real RAID setup would change this > * No change in pgbench (so I guess no regression for small transactions) If the gain is visible mostly for the backward and not for other access patterns I suggest to check the work done in backward-prefecthing in linux. http://thread.gmane.org/gmane.linux.kernel.mm/73837 for example I don't know how others (BSD, windows, ...) handle this case. Maybe the strategy to use our own prefetch is better, then I would like to use it also in places where we used to hack to make linux understand that we will benefits from prefetching. -- Cédric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - Développement, Expertise et Formation