Re: Covering Indexes - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Covering Indexes
Date
Msg-id F7D227DF-230D-40CE-BD3D-D3C4401AC705@justatheory.com
Whole thread Raw
In response to Re: Covering Indexes  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Covering Indexes  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Jul 17, 2012, at 5:18 PM, Simon Riggs wrote:

>> Now that we have index-only scans in 9.2, I'm wondering if it would make sense to add covering index support, too,
whereadditional, unindexed columns are stored alongside indexed columns. 
>
> Just to be clear, the ability to have covered indexes is already in
> 9.2, I updated the release notes to explain that a few months back.

You mean this?

> Allow queries to retrieve data only from indexes, avoiding heap access (Robert Haas, Ibrar Ahmed, Heikki Linnakangas,
TomLane) 
>
> This is often called "index-only scans" or "covering indexes". This is possible for heap pages with exclusively
all-visibletuples, as reported by the visibility map. The visibility map was made crash-safe as a necessary part of
implementingthis feature. 

That’s not how SQLite is using the term “covering index.” What they mean is the ability to have additional, unindexed
columnsin an index, so that they can *also* be returned in the event of an index-only scan. 

Best,

David



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Covering Indexes
Next
From: Simon Riggs
Date:
Subject: Re: Covering Indexes