Re: Predicate migration on complex self joins
От | Sam Mason |
---|---|
Тема | Re: Predicate migration on complex self joins |
Дата | |
Msg-id | 20090714160925.GA5407@samason.me.uk обсуждение исходный текст |
Ответ на | Re: Predicate migration on complex self joins (Simon Riggs <simon@2ndQuadrant.com>) |
Список | pgsql-hackers |
On Mon, Jul 13, 2009 at 07:06:40PM +0100, Simon Riggs wrote: > On Mon, 2009-07-13 at 13:33 -0400, Tom Lane wrote: > > It's hard to believe > > this sort of case comes up often enough to justify the cycles that would > > be expended (on *every* join query) to try to recognize it. > > Yeh, damn ORMs seem to spring up faster than vines. > > Not just because of this but I wonder if we might benefit from an > optimizer setting specifically aimed at the foolishnesses of > automatically generated SQL. The best suggestion I heard was to carry on optimizing until the plan looked cheap enough or all the options had been exhausted. In practical terms; I think this means doing the planning in two stages, try with all the "simple" optimizations and see if it results in less than "n" page accesses, if it's above this level then try again with all the optimizations turned on. -- Sam http://samason.me.uk/
В списке pgsql-hackers по дате отправления: