Re: Fighting the planner >:-(

Поиск
Список
Период
Сортировка
От Casey Allen Shobe
Тема Re: Fighting the planner >:-(
Дата
Msg-id CAFmVg3ikX7VDtLxJD31jRKTGKS40qWO2zeNf06+3T3C2AjfC7g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fighting the planner >:-(  (Casey Allen Shobe <casey@shobe.info>)
Ответы Re: Fighting the planner >:-(
Список pgsql-performance
Rhodiumtoad on IRC helped me figure out how to move part of the query into a CTE in order to work around the planner problem.  This is a hack but it brings the time down from many hours to 17 seconds, which is better than it was even with the better plan in the first place!  For some reason it actually gets 2 seconds faster yet by putting it in a SQL function rather than using prepare/execute.

Hopefully some improvements to the planner can come from this information?

Here is the CTE version of the query:  http://pgsql.privatepaste.com/2f7fd3f669
...and  here is it's explain analyze:  http://explain.depesz.com/s/5ml

--
Casey Allen Shobe
casey@shobe.info


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

Предыдущее
От: Casey Allen Shobe
Дата:
Сообщение: Re: Fighting the planner >:-(
Следующее
От: Виктор Егоров
Дата:
Сообщение: Re: Fighting the planner >:-(