Skip site navigation (1) Skip section navigation (2)

Re: Performace comparison of indexes over timestamp fields

From: "Alexander Staubo" <alex(at)purefiction(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performace comparison of indexes over timestamp fields
Date: 2007-05-22 13:00:51
Message-ID: 88daf38c0705220600y7ec63ed7x7920576abf92ea32@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On 5/22/07, Steinar H. Gunderson <sgunderson(at)bigfoot(dot)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.

In response to

pgsql-performance by date

Next:From: Stephane BailliezDate: 2007-05-22 13:10:29
Subject: Tips & Tricks for validating hardware/os
Previous:From: Steinar H. GundersonDate: 2007-05-22 12:43:20
Subject: Re: Performace comparison of indexes over timestamp fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group