Re: [PATCH] Prefetch index pages for B-Tree index scans - Mailing list pgsql-hackers

From Cédric Villemain
Subject Re: [PATCH] Prefetch index pages for B-Tree index scans
Date
Msg-id 201210292017.09924.cedric@2ndquadrant.com
Whole thread Raw
In response to Re: [PATCH] Prefetch index pages for B-Tree index scans  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: [PATCH] Prefetch index pages for B-Tree index scans  (Claudio Freire <klaussfreire@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Is there a way to test for UNASSIGNED in pl/pgsql
Next
From: Gavin Flower
Date:
Subject: Re: Index creation in postgresql