From: Alexander Staubo <alex@purefiction.net>
To: pgsql-performance@postgresql.org
Subject: Re: Performace comparison of indexes over timestamp fields
Date: Tue, 22 May 2007 15:00:51 +0200
Message-ID: <88daf38c0705220600y7ec63ed7x7920576abf92ea32@mail.gmail.com> (raw)
In-Reply-To: <20070522124320.GA24779@uio.no>
References: <4652C846.4020801@andromeiberica.com>
<88daf38c0705220539q5807d2c2t1f20a03922bf8d33@mail.gmail.com>
<20070522124320.GA24779@uio.no>
On 5/22/07, Steinar H. Gunderson <sgunderson@bigfoot.com> wrote:
> On Tue, May 22, 2007 at 02:39:33PM +0200, Alexander Staubo wrote:
> > PostgreSQL uses B-tree indexes for scalar values. For an expression
> > such as "t between a and b", I believe it's going to match both sides
> > of the table independently (ie., t >= a and t <= b) and intersect
> > these subsets. This is inefficient.
>
> A B-tree index can satisfy range queries such as this.
You're right, and I'm wrong -- my head is not in the right place
today. B-trees are inefficient for intervals, but quite satisfactory
for range searches.
Alexander.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alex@purefiction.net
Subject: Re: Performace comparison of indexes over timestamp fields
In-Reply-To: <88daf38c0705220600y7ec63ed7x7920576abf92ea32@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox