Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group