index does not help on ranges - Mailing list pgsql-general

From Peter Pilsl
Subject index does not help on ranges
Date
Msg-id 20010904010007.E20369@i3.atat.at
Whole thread Raw
List 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@goldfisch.at
sms  : pilsl@max.mail.at

pgp-key available

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump error
Next
From: Dave Cramer
Date:
Subject: Re: Crash in vacuum analyze