Re: strange query behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: strange query behavior
Дата
Msg-id 10648.1166037392@sss.pgh.pa.us
обсуждение исходный текст
Ответ на strange query behavior  ("Tim Jones" <TJones@optio.com>)
Ответы Re: strange query behavior  ("Tim Jones" <TJones@optio.com>)
Список pgsql-performance
"Tim Jones" <TJones@optio.com> writes:
>   I have a query that uses an IN clause and it seems in perform great
> when there is more than two values in it but if there is only one it is
> really slow. Also if I change the query to use an = instead of IN in the
> case of only one value it is still slow.

Please provide EXPLAIN ANALYZE output for both cases.

> Possibly I need to reindex this
> particular index?

More likely you need to ANALYZE the table so that the planner has
up-to-date stats ...

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Ragnar
Дата:
Сообщение: Re: strange query behavior
Следующее
От: James Cloos
Дата:
Сообщение: Optimizing a query