index does not help on ranges

From: Peter Pilsl <pilsl(at)goldfisch(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: index does not help on ranges
Date: 2001-09-03 23:00:07
Message-ID: 20010904010007.E20369@i3.atat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Assuming a simple table with 1.000.000 entries. One column is type
integer and running from 1 to 1.000.000 (sequence). There is an index
on this column, so queries like

select * from many where serial=784193;

are pretty fast. However, such simple queries like

select * from many where serial<10;

take very long time. The query doesnt use the index in this case. Is
this a problem on my side or is this a prinicipal thing ?

thnx,
peter

--
mag. peter pilsl

phone: +43 676 3574035
fax : +43 676 3546512
email: pilsl(at)goldfisch(dot)at
sms : pilsl(at)max(dot)mail(dot)at

pgp-key available

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2001-09-03 23:05:15 Re: Crash in vacuum analyze
Previous Message Tom Lane 2001-09-03 22:52:59 Re: pg_dump error