From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | "Martin D(dot) Weinberg" <weinberg(at)astro(dot)umass(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: multi-column btree index for real values |
Date: | 2002-10-05 14:02:58 |
Message-ID: | 20021005140257.GB7476@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Oct 03, 2002 at 02:00:30PM -0400, Martin D. Weinberg wrote:
> Folks,
>
> Can someone quickly describe how the btree is implemented for multiple
> columns? In particular, under what (if any) circumstances is there an
> advantage if the index is over floating point values?
AFAIK, multi-column btrees and simply handled by building a btree of the
first column. Each leaf contains a reference to another btree for the second
column, etc...
btrees are useful for < and > comparisons, meaning that queries saying WHERE
x BETWEEN 1.0 and 1.5 can use the index.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
From | Date | Subject | |
---|---|---|---|
Next Message | Baurjan Ismagulov | 2002-10-05 15:12:47 | Re: SERIAL with TTable in cbuilder |
Previous Message | Martijn van Oosterhout | 2002-10-05 13:50:50 | Server locale? |