Re: Forcing the right queryplan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Forcing the right queryplan
Дата
Msg-id 29669.1284045396@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Forcing the right queryplan  (Henk van Lingen <H.G.K.vanLingen@uu.nl>)
Ответы Re: Forcing the right queryplan  (Henk van Lingen <H.G.K.vanLingen@uu.nl>)
Список pgsql-general
Henk van Lingen <H.G.K.vanLingen@uu.nl> writes:
> On Thu, Sep 09, 2010 at 10:50:52AM -0400, Tom Lane wrote:
>>>> Well, there's your problem: the planner is off by a factor of about 500
>>>> on its estimate of the number of rows matching this query, and that's
>>>> what's causing it to pick the wrong plan.  What you need to look into
>>>> is getting that estimate to be more in sync with reality.  Probably
>>>> increasing the stats target for the message column would help.

>   But how can I get sane estimates for syslog data? Some searchstrings will
>   result in only a few hits, others in thousands of records or more.

That's what ANALYZE is for ...

            regards, tom lane

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

Предыдущее
От: Henk van Lingen
Дата:
Сообщение: Re: Forcing the right queryplan
Следующее
От: Ungermann Carsten
Дата:
Сообщение: Re: Regular expression in an if-statement will not work