index does not help on ranges

Поиск
Список
Период
Сортировка
От Peter Pilsl
Тема index does not help on ranges
Дата
Msg-id 20010904010007.E20369@i3.atat.at
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump error
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Crash in vacuum analyze