Re: Covering Indexes

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Covering Indexes
Date: 2012-07-17 15:21:51
Message-ID: F7D227DF-230D-40CE-BD3D-D3C4401AC705@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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, where additional, 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, Tom Lane)
>
> This is often called "index-only scans" or "covering indexes". This is possible for heap pages with exclusively all-visible tuples, as reported by the visibility map. The visibility map was made crash-safe as a necessary part of implementing this feature.

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

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-07-17 15:32:28 Re: Covering Indexes
Previous Message Simon Riggs 2012-07-17 15:18:19 Re: Covering Indexes