| От | Tom Lane |
|---|---|
| Тема | Re: Indexes not used |
| Дата | |
| Msg-id | 24865.984758962@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Indexes not used ("D. Duccini" <duccini@backpack.com>) |
| Ответы |
Re: Indexes not used
|
| Список | pgsql-novice |
"D. Duccini" <duccini@backpack.com> writes:
> Maybe I'm not getting something here...but how is a sequential scan EVER
> faster than a B-tree / index lookup on a database with over 500,000
> records?
If the system needs to fetch more than a small percentage of the
records, then seqscan *will* be faster. The issue you are dealing
with seems to be misestimation of the retrieval percentage for this
particular query, causing the planner to guess wrong about which
kind of plan to use.
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера