Re: Query progress indication - an implementation - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Query progress indication - an implementation
Date
Msg-id 603c8f070907021127y22dbd504n324ef20e620800d9@mail.gmail.com
Whole thread Raw
In response to Re: Query progress indication - an implementation  (Scara Maccai <m_lists@yahoo.it>)
List pgsql-hackers
On Thu, Jul 2, 2009 at 12:48 PM, Euler Taveira de
Oliveira<euler@timbira.com> wrote:
> I know that it didn't solve the estimation problem but ... IMHO the
> [under|over]estimation should be treated by an external tool (autoexplain?).
> So when we enable the query progress and some node reports a difference
> between estimated and real more than x%, log the plan. Doing it, we will be
> helping DBAs to investigate the bad plans.

Keep in mind that it is frequently the case that the estimates are
substantially off but the plan still works OK.  I just put a dirty
hack into one of my apps to improve the selectivity estimates by a
factor of 200, but they're still off by a factor of 5.  Even when they
were off by 1000x the bad plan happened only intermittently.  You
notice the cases where the estimates are off and it makes for a bad
plan, but there are lots of other cases where the estimates are off
but the plan is still OK.

...Robert


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_migrator mention in documentation
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_migrator mention in documentation