Re: Fuzzy cost comparison to eliminate redundant planning work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fuzzy cost comparison to eliminate redundant planning work
Date: 2004-03-28 22:30:35
Message-ID: 19045.1080513035@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mike Mascari <mascarm(at)mascari(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-03-29 01:32:03 Re: Fuzzy cost comparison to eliminate redundant planning
Previous Message Mike Mascari 2004-03-28 22:07:41 Re: Fuzzy cost comparison to eliminate redundant planning