Re: Multi-pass planner - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Multi-pass planner
Date
Msg-id 407d949e0908201031p1f382d8ag6053a9302eb29501@mail.gmail.com
Whole thread Raw
In response to Re: Multi-pass planner  (Greg Stark <gsstark@mit.edu>)
Responses Re: Multi-pass planner  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Multi-pass planner  (Mischa Sandberg <mischa.sandberg@sophos.com>)
List pgsql-hackers
On Thu, Aug 20, 2009 at 6:28 PM, Greg Stark<gsstark@mit.edu> wrote:
> I don't think it's a bad idea, I just think you have to set your
> expectations pretty low. If the estimates are bad there isn't really
> any plan that will be guaranteed to run quickly.

Actually this is usually Tom's point when this topic comes up. Say
you're deciding between an index scan and a sequential scan. The
sequential scan has a total cost of 1000..1000 but the index scan has
an estimated total cost of 1..10000. If you pick the sequential scan
you might be running 1000x slower than the index scan in the worst
case. But if you pick the index scan you might be running 10x slower
than the sequential scan in the worst case. If you don't trust the
estimate where does that leave you? Making a mistake either way is
fatal.


-- 
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Multi-pass planner
Next
From: "Kevin Grittner"
Date:
Subject: Re: Multi-pass planner