Re: the big picture for index-only scans - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: the big picture for index-only scans
Date
Msg-id 4DC91ED8020000250003D4E0@gw.wicourts.gov
Whole thread Raw
In response to Re: the big picture for index-only scans  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: the big picture for index-only scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: the big picture for index-only scans  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> wrote:
> This topic has been discussed many times, yet I have never seen an
> assessment that explains WHY we would want to do index-only scans.
In databases with this feature, it's not too unusual for a query
which uses just an index to run one or more orders of magnitude
faster than a query which has to randomly access the heap for each
index entry.  That seems like enough evidence of its possible value
in PostgreSQL to proceed to the point where benchmarks become
possible.  I'm assuming that, like all other features added as
performance optimizations, it won't be committed until there are
benchmarks showing the net benefit.
As a thought experiment, picture the relative costs of scanning a
portion of an index in index sequence, and being done, versus
scanning a portion of an index in index sequence and jumping to a
random heap access for each index entry as you go.
-Kevin


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Process wakeups when idle and power consumption
Next
From: Tom Lane
Date:
Subject: Re: Process wakeups when idle and power consumption