Re: Review remove {join, from}_collapse_limit, add enable_join_ordering

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: Review remove {join, from}_collapse_limit, add enable_join_ordering
Date: 2009-07-16 17:29:09
Message-ID: 200907161929.09848.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday 16 July 2009 19:22:30 Robert Haas wrote:
> On Thu, Jul 16, 2009 at 11:32 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > I wrote:
> >> If I set both collapse_limit variables to very high values (I used 999),
> >> it takes ... um ... not sure; I gave up waiting after half an hour.
> >> I also tried with geqo_effort reduced to the minimum of 1, but that
> >> didn't produce a plan in reasonable time either (I gave up after ten
> >> minutes).
> >
> > After I gave up letting the machine be idle to get a fair timing,
> > I turned on oprofile monitoring. It looks a bit interesting:
> That is interesting, but there's not really enough detail here to see
> what is going on. I'm more interested in what the high-level
> functions are doing that's causing these guys to be called so many
> times. As Greg says, if the planning time curve for GEQO isn't better
> than the one for the standard planner, it's the epitome of pointless.
It is not the actual genetic searching I now found out (or more precisely,
read the trace correctly).

At the start of the query GEQO fills a pool with random paths through the
searchspace. Unfortunately a random path is not very likely to succeed. So it
checks and checks and...

Thats why that problem is not visible with a simple join out of 100 or so
tables - all paths are valid there...

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-07-16 17:31:25 Re: [PATCH] [v8.5] Security checks on largeobjects
Previous Message Tom Lane 2009-07-16 17:26:22 Re: Review remove {join, from}_collapse_limit, add enable_join_ordering