Re: Searching for the cause of a bad plan

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Searching for the cause of a bad plan
Дата
Msg-id 1190982832.5430.94.camel@PCD12478
обсуждение исходный текст
Ответ на Re: Searching for the cause of a bad plan  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-performance
> Just an idea, but with the 8.3 concurrent scan support would it be
> possible to hang a more in depth analyze over exisiting sequential
> scans. Then it would be a lower cost to have higher resolution in
> the statistics because the I/O component would be hidden.

The biggest problem with that is that it wouldn't be deterministic...
the table in question from my original post is never scanned
sequentially in normal operation. The other way around is also possible,
when sequential scans are too frequent, in that case you wouldn't want
to also analyze all the time. So there would be a need for logic of when
to analyze or not with a sequential scan and when do it proactively
without waiting for one... and I'm not sure it will be worth the
complexity.

I think it would me much more productive if some "long running query"
tracking combined with a "background planner" thread would do targeted
analyzes for specific correlations/distributions/conditions based on
what queries are actually running on the system.

Cheers,
Csaba.



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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Searching for the cause of a bad plan
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Tuning for warm standby