Re: If an index is based on 3 columns will a query using - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: If an index is based on 3 columns will a query using
Date
Msg-id 43259DE2.9010209@sigaev.ru
Whole thread Raw
In response to Re: If an index is based on 3 columns will a query using two of the columns utilize the index?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
List pgsql-general
> Greg Stark suggests here:
> http://archives.postgresql.org/pgsql-hackers/2005-05/msg00966.php
> that GiST could also be fixed to work with any subset of the index
> columns, but it hasn't been done yet, unless Teodor and Oleg snuck
> something in during that last round of GiST work.

GiST may work with any subset of index columns too. Even in existing code I
don't see any problem except NULL in a first column. GiST doesn't store tuples
with leading NULL value (gist.c lines 174, 326), so index doesn't contained them.

After our work about WAL-lization GiST, it may work with "invalid" tuples
(possibly occured after crash recovery), so itsn't a big deal to add support
NULL in a first column. But freeze date is outdated... Should I add or leave it
to 8.2?



--
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Replication
Next
From: Greg Stark
Date:
Subject: Re: If an index is based on 3 columns will a query using two of the columns utilize the index?