Covering Indexes

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Covering Indexes
Date: 2012-06-28 12:16:45
Message-ID: 7138506E-2A5D-4AA6-A8CD-DC9FB4D7344E@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

Very interesting design document for SQLite 4:

http://www.sqlite.org/src4/doc/trunk/www/design.wiki

I'm particularly intrigued by "covering indexes". For example:

CREATE INDEX cover1 ON table1(a,b) COVERING(c,d);

This allows the following query to do an index-only scan:

SELECT c, d FROM table1 WHERE a=? AND b=?;

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.

And I wonder if it would work well with expressions, too?

David

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-06-28 12:18:37 Re: Uh, I change my mind about commit_delay + commit_siblings (sort of)
Previous Message Robert Haas 2012-06-28 12:16:11 Re: Patch: Fix for a small tipo (space lost)