Re: GiST: PickSplit and multi-attr indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)stack(dot)net>
Subject: Re: GiST: PickSplit and multi-attr indexes
Date: 2004-11-16 14:40:03
Message-ID: 17937.1100616003@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway <neilc(at)samurai(dot)com> writes:
> On Mon, 2004-11-15 at 10:19 -0500, Tom Lane wrote:
>> I'm not familiar with the details of the GiST code, but would it work to
>> generalize PickSplit to return a three-way classification? That is,
>> instead of actually splitting the node, have it identify each item as
>> "definitely left", "definitely right", or "don't care" (think "less",
>> "greater", or "equal to" the desired split value).

> I had thought about this solution, but I was worried that it will
> actually make GiST a less general framework, because it requires that
> the PickSplit() method effectively order the leaves of the tree. For
> btree that is a reasonable assumption to make, but I'm not sure if it
> can or should be made in general.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bort, Paul 2004-11-16 15:19:30 Re: psql \e broken again
Previous Message Roberto Fichera 2004-11-16 14:37:31 pg_dump problem