From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Planner creating ineffective plans on LEFT OUTER joins |
Date: | 2008-06-26 21:33:48 |
Message-ID: | 48640B3C.3010401@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
>> Couldn't the planner itself make a good guess if it should
>> keep trying based on the estimated cost?
>
>> if (the_best_plan_I_found_so_far_looks_like_itll_take_an_hour)
>> keep_optimizing_for_a_few_minutes
>> if (the_best_plan_I_found_so_far_looks_like_itll_take_0.01ms)
>> stop_planning_and_run_with_it
>
> You're operating on a mistaken assumption, which is that we generate a
> complete plan and then generate another. The places where we'd actually
> be doing something with an effort variable are usually dealing with
> small parts of plans, or even with preparatory calculations before we've
> got anything plan-like at all. They haven't got a sufficiently holistic
> view of what's happening to apply a rule like the above.
Then could the logic wait until the final plan is computed;
and if that final plan looks very expensive (compared with
the plan time so far), try again with the effort variable
automatically increased?
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-06-26 22:51:46 | Removal of the patches email list |
Previous Message | Tom Lane | 2008-06-26 21:23:18 | Re: Planner creating ineffective plans on LEFT OUTER joins |