Re: Multi-pass planner

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "decibel" <decibel(at)decibel(dot)org>, "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Multi-pass planner
Date: 2009-08-20 16:55:54
Message-ID: 4A8D39CA0200002500029EB4@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> I think one of the problems with the planner is that all decisions
> are made on the basis of cost. Honestly, it works amazingly well in
> a wide variety of situations, but it can't handle things like "we
> might as well materialize here, because it doesn't cost much and
> there's a big upside if our estimates are off". The estimates are
> the world, and you live and die by them.

["thinking out loud"]

If there were some reasonable way to come up with a *range* for cost
at each step, a reasonable heuristic might be to cost the plan using
minimum values and maximum values, and use the root mean square of the
two for comparisons to other plans. I don't know that we have a good
basis to come up with ranges rather than absolute numbers, though.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-20 17:10:15 Re: Multi-pass planner
Previous Message Robert Haas 2009-08-20 16:49:33 Re: explain root element for auto-explain