Re: Poor performance using CTE

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Poor performance using CTE
Дата
Msg-id 50ACE970.7050701@dunslane.net
обсуждение исходный текст
Ответ на Re: Poor performance using CTE  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: Poor performance using CTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On 11/21/2012 08:04 AM, Heikki Linnakangas wrote:
> On 21.11.2012 01:53, Tom Lane wrote:
>> I think the more interesting question is what cases wouldn't be covered
>> by such a rule.  Typically you need to use OFFSET 0 in situations where
>> the planner has guessed wrong about costs or rowcounts, and I think
>> people are likely using WITH for that as well.  Should we be telling
>> people that they ought to insert OFFSET 0 in WITH queries if they want
>> to be sure there's an optimization fence?
>
> Yes, I strongly feel that we should. Writing a query using WITH often
> makes it more readable. It would be a shame if people have to refrain
> from using it, because the planner treats it as an optimization fence.
>
>



If we're going to do it can we please come up with something more
intuitive and much, much more documented than "OFFSET 0"? And if/when we
do this we'll need to have big red warnings all over then release notes,
since a lot of people I know will need to do some extensive remediation
before moving to such a release.

cheers

andrew



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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Hints (was Poor performance using CTE)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance using CTE