Re: multi-column btree index for real values - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: multi-column btree index for real values
Date
Msg-id 20021005140257.GB7476@svana.org
Whole thread Raw
In response to multi-column btree index for real values  ("Martin D. Weinberg" <weinberg@astro.umass.edu>)
Responses Re: multi-column btree index for real values  (Martin Weinberg <weinberg@osprey.astro.umass.edu>)
List 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@svana.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.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Server locale?
Next
From: Martin Weinberg
Date:
Subject: Re: multi-column btree index for real values