Re: Slow query - index not used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow query - index not used
Дата
Msg-id 27761.1074642972@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow query - index not used  (Michael Brusser <michael@synchronicity.com>)
Ответы Re: Slow query - index not used  (Michael Brusser <michael@synchronicity.com>)
Список pgsql-hackers
Michael Brusser <michael@synchronicity.com> writes:
> Using "DEFAULT_STATISTICS_TARGET = 100" made db use index for 
> field = 'abc', but field = 'xyz' still results in the table scan.

What's the actual distribution of values in these columns?  Are you
searching for values that are particularly common or uncommon?

> Also 'rows' number reported in the plan is way off.

That would seem to be the crux of the problem, but you'd better be more
specific than "way off".
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Allow backend to output result sets in XML
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Old binary packages.