Re: Seq. scan when using comparison operators, why? [netaktiv.com #150]
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Seq. scan when using comparison operators, why? [netaktiv.com #150] |
| Дата | |
| Msg-id | 20458.1018275305@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Seq. scan when using comparison operators, why? [netaktiv.com #150] (Stephane Bortzmeyer <bortzmeyer@netaktiv.com>) |
| Ответы |
Re: Seq. scan when using comparison operators, why? [netaktiv.com #150]
|
| Список | pgsql-general |
Stephane Bortzmeyer <bortzmeyer@netaktiv.com> writes:
> I have an index on column "numero". When, I use a WHERE numero=8,
> PostgreSQL uses an index scan (OK) but no when using comparison
> operators like numero>8.
That is the default behavior in the absence of any VACUUM ANALYZE
stats (and your explains look suspiciously like default stats).
If you have stats then the choice will depend on how much of the table
the planner estimates will be scanned. An indexscan is generally not
a win for scanning more than a few percent of a table.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера