Re: Predicate migration on complex self joins

Поиск
Список
Период
Сортировка
Искать
От
Sam Mason
Тема
Re: Predicate migration on complex self joins
Дата
Msg-id
20090714160925.GA5407@samason.me.uk
Ответ на
Список
Дерево обсуждения
Predicate migration on complex self joins Simon Riggs <simon@2ndQuadrant.com>
Re: Predicate migration on complex self joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Predicate migration on complex self joins Simon Riggs <simon@2ndQuadrant.com>
Re: Predicate migration on complex self joins Sam Mason <sam@samason.me.uk>
Re: Predicate migration on complex self joins decibel <decibel@decibel.org>
Re: Predicate migration on complex self joins Jaime Casanova <jcasanov@systemguards.com.ec>
Re: Predicate migration on complex self joins Robert Haas <robertmhaas@gmail.com>
Re: Predicate migration on complex self joins "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Predicate migration on complex self joins Tom Lane <tgl@sss.pgh.pa.us>
Re: Predicate migration on complex self joins "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
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 по дате отправления
От: Jaime Casanova
Дата:
Сообщение: Re: Sampling profiler updated
От: Stefan Kaltenbrunner
Дата:
FAQ