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
Есть вопросы? Напишите нам!
✖
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.