| От | Tom Lane |
|---|---|
| Тема | Re: help with query... |
| Дата | |
| Msg-id | 10955.1180389188@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | help with query... (marcelo Cortez <jmdc_marcelo@yahoo.com.ar>) |
| Список | pgsql-general |
marcelo Cortez <jmdc_marcelo@yahoo.com.ar> writes:
> I am confused ,
> way planer it does not use the partial index?
> query:
> SELECT cliente_base.* FROM cliente_base
> WHERE (cliente_base.inst_class_ = 'Cliente' ) ORDER
> BY cliente_base.nombre ASC
Because it thinks the seqscan is cheaper. It might be right, depending
on how selective the index predicate is and how close the index order
matches the physical heap order. Have you tried forcing an indexscan
(eg, by setting enable_sort = off) and comparing estimated and actual
costs for that case?
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера