Re: index scan on =, but not < ?

Поиск
Список
Период
Сортировка
От Rick Schumeyer
Тема Re: index scan on =, but not < ?
Дата
Msg-id 002801c52411$6d510f40$0200a8c0@dell8200
обсуждение исходный текст
Ответ на Re: index scan on =, but not < ?  (Thomas F.O'Connell <tfo@sitening.com>)
Список pgsql-performance
That makes a lot of sense.  Sure enough, if I change the query from
WHERE x > 0  (which return a lot of rows) to
WHERE x > 0 AND x < 1
I now get an index scan.

> As for why you see index usage in your first example query and not your
> second: compare the number of rows in question. An index is extremely
> useful if 19 rows will be returned. But when 62350411 rows will be
> returned, you're talking about a substantial fraction of the table. A
> sequential scan will probably correctly be judged to be faster by the
> planner.
>


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

Предыдущее
От: John Arbash Meinel
Дата:
Сообщение: Re: index scan on =, but not < ?
Следующее
От: Dennis Bjorklund
Дата:
Сообщение: Re: index scan on =, but not < ?