| From: | Greg Stark <gsstark(at)mit(dot)edu> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: GiST: PickSplit and multi-attr indexes |
| Date: | 2004-11-16 20:58:01 |
| Message-ID: | 87wtwl7bqe.fsf@stark.xeocode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> If there are no don't-care cases, then you're effectively saying that
> the first column's PickSplit has sole control over the tree shape,
> which is where we're at now. ISTM the entire point of a multi-column
> index is that the first column has duplicates, or at least values that
> are similar enough to qualify as don't-cares.
I'm not sure that GiST indexes behave the same way as btree indexes for the
multi-column case.
In a btree index the second column is entirely subordinate to the first
column. In a GiST index the data is multi-dimensional, and all dimensions are
equally important.
For a concrete example, say you wanted to index a 2d cartesian coordinate. If
you stored it in a single column using the point data type (or a 2 element
array) then the PickSplit function can use both coordinates to determine its
split. A GiST index on two separate integer columns really shouldn't be
prevented from operating in the same way.
--
greg
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2004-11-16 21:02:08 | Re: Minor problem with Makefile.shlib |
| Previous Message | Thomas Hallgren | 2004-11-16 20:28:41 | Minor problem with Makefile.shlib |