| От | Tom Lane |
|---|---|
| Тема | Re: Use of index for 50% column restriction |
| Дата | |
| Msg-id | 2416.1465406934@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Use of index for 50% column restriction (Bruce Momjian <bruce@momjian.us>) |
| Ответы |
Re: Use of index for 50% column restriction
|
| Список | pgsql-hackers |
Bruce Momjian <bruce@momjian.us> writes:
> As part of my research on the parsing/planning behavior of PREPARE, I
> found a surprising behavior --- a WHERE clause that is 50% restrictive
> is using an index. I thought only <10% restrictions used indexes.
There's no such hard-and-fast rule. The cost estimate break point depends
greatly on the index order correlation (which is 100% in your example),
as well as some other factors like the index size versus
effective_cache_size.
For randomly-ordered data I believe the cutover is actually well below 10%.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера