Re: Fuzzy cost comparison to eliminate redundant planning work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fuzzy cost comparison to eliminate redundant planning work
Date
Msg-id 19045.1080513035@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fuzzy cost comparison to eliminate redundant planning  (Mike Mascari <mascarm@mascari.com>)
List pgsql-hackers
Mike Mascari <mascarm@mascari.com> writes:
> Tom Lane wrote:
>>> I found that this reduced the planning time of Eric's
>>> query by about 40%, without changing the resulting plan.

> More great news, as always. IIRC you recently bumped the default 
> GEQO threshold from eleven to twelve. With your new fuzzy comparison 
> patch is twelve still the appropriate number?

I'm not sure that this change will make much difference at all to
"typical" queries.  Eric's query is something of an outlier because it
is a nine-way self-join, which means that all the base tables have
exactly the same statistics and so there are a lot more join paths with
identical cost estimates than you'd normally expect.

However, the paths being gotten rid of by the patch aren't quite
identical in cost, so maybe there will be some effect for more typical
queries.  If you have some expensive-to-plan queries, please do try it
and report back.  AFAIK the given patch should drop into 7.4 or even
earlier without much problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Mike Mascari
Date:
Subject: Re: Fuzzy cost comparison to eliminate redundant planning
Next
From: Joe Conway
Date:
Subject: Re: Fuzzy cost comparison to eliminate redundant planning