Using B-Tree index for such kind of queries (with '>','<')

Поиск
Список
Период
Сортировка
От Andrzej Zeja
Тема Using B-Tree index for such kind of queries (with '>','<')
Дата
Msg-id 002101c1f503$64ac6050$95d1a4c3@tu.kielce.pl
обсуждение исходный текст
Список pgsql-cygwin
Hi
 
I've got table Test and index for this table B-Tree type.
and
I've made query like:
    Select * from test where Id<100;
During execution Optimizer makes no use of the index.
In documentation stands that using B-Tree index is used for such kind of queries (with '>','<').
Everything works fine only for '=' comparision.
 
Why it doesn't work in my case?
Why Sequenced Scan is executed instead of indexed scan?
 
Below is output of my query:
template1=# explain select * from test where id > 100;
NOTICE:  QUERY PLAN:
Seq Scan on test  (cost=0.00..1.06 rows=3 width=18)
NOTICE:  QUERY PLAN:
Seq Scan on test  (cost=0.00..1.06 rows=3 width=18)
 
Andrzej

В списке pgsql-cygwin по дате отправления:

Предыдущее
От: Liviu Taloi
Дата:
Сообщение: The service did not respond to the start..
Следующее
От: "Henshall, Stuart - WCP"
Дата:
Сообщение: Re: Using B-Tree index for such kind of queries (with '