| From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
|---|---|
| To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:18:47 |
| Message-ID: | 486407B7.7060105@cheapcomplexdevices.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Simon Riggs wrote:
> IMHO we should have a single parameter which indicates how much planning
> time we consider acceptable for this query. e.g.
> optimization_level = 2 (default), varies 1-3
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
Or maybe as simple as something like
if (time_spent_planning >= cost_of_the_best_plan_found / 10)
stop_optimizing.
If we wanted a GUC, perhaps make it that 10 in the expression above?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-06-26 21:23:18 | Re: Planner creating ineffective plans on LEFT OUTER joins |
| Previous Message | Josh Berkus | 2008-06-26 21:04:07 | Re: TODO Item: Allow pg_hba.conf to specify host names along with IP addresses |