Re: "Constraint exclusion" is not general enough - Mailing list pgsql-hackers

From Florian G. Pflug
Subject Re: "Constraint exclusion" is not general enough
Date
Msg-id 44D8488E.10206@phlo.org
Whole thread Raw
In response to Re: "Constraint exclusion" is not general enough  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Florian G. Pflug" <fgp@phlo.org> writes:
>> Tom Lane wrote:
>>> But you don't have any cost numbers until after you've done the plan.
> 
>> Couldn't this work similar to geqo_effort? The planner could
>> try planning the query using only cheap algorithmns, and if
>> the cost exceeds a certain value, it'd restart, and use
>> more sophisticated methods.
> 
> AFAICS this would be a net loss on average.  Most of the time, the
> constraint exclusion code doesn't win, and so throwing away all your
> planning work to try it is going to be a loser most of the time.

On the other hand, if the "consider-replanning" threshold is high enough,
than that additional time really doesn't matter - If a query runs for minutes,
or even hours, a few wasted cycles during planning don't hurt.

greetings, Florian Pflug


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 8.2 features status
Next
From: Csaba Nagy
Date:
Subject: Re: PostgreSQL performance enhancement when query