Re: help with query...

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to implement GOMONTH function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Possible DB corruption