From: | Vik Reykja <vikreykja(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | "David E(dot) Wheeler" <david(at)justatheory(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Covering Indexes |
Date: | 2012-07-17 16:19:43 |
Message-ID: | CALDgxVv7GmdRtow1OSpOory7SmvvzQRFVJyjT3aCEQvMAK720A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 17, 2012 at 6:08 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 17 July 2012 16:54, David E. Wheeler <david(at)justatheory(dot)com> wrote:
> > Yeah, but that index is unnecessarily big if one will never use c or d
> in the search. The nice thing about covering indexes as described for
> SQLite 4 and implemented in MSSQL is that you can specify additional
> columns that just come along for the ride, but are not part of the indexed
> data:
> >
> > CREATE INDEX cover1 ON table1(a,b) COVERING(c,d);
> >
> > Yes, you can do that by also indexing c and d as of 9.2, but it might be
> nice to be able to include them in the index as additional row data without
> actually indexing them.
>
> Can you explain what you mean by "without actually indexing them"?
> ISTM that it is a non-feature if the index is already non-unique, and
> the difference is simply down to the amount of snake oil applied to
> the descriptive text on the release notes.
>
It would be useful in non-unique indexes to store data without ordering
operators (like xml).
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2012-07-17 16:41:47 | Re: Covering Indexes |
Previous Message | Simon Riggs | 2012-07-17 16:08:59 | Re: Covering Indexes |