Re: Spotting planner errors (was Re: Query planner is using wrong index.) - Mailing list pgsql-performance

From Tom Lane
Subject Re: Spotting planner errors (was Re: Query planner is using wrong index.)
Date
Msg-id 12067.1144422772@sss.pgh.pa.us
Whole thread Raw
In response to Spotting planner errors (was Re: Query planner is using wrong index.)  (Richard Huxton <dev@archonet.com>)
Responses Re: Spotting planner errors (was Re: Query planner is using  (Richard Huxton <dev@archonet.com>)
List pgsql-performance
Richard Huxton <dev@archonet.com> writes:
> Tom - does the planner/executor know it's got row estimates wrong? That
> is, if I'm not running an EXPLAIN ANALYSE is there a point at which we
> could log "planner estimate for X out by factor of Y"?

Not at the moment, but you could certainly imagine changing the executor
to count rows even without EXPLAIN ANALYZE, and then complain during
plan shutdown.

Not sure how helpful that would be; there would be a lot of noise from
common cases such as executing underneath a LIMIT node.

            regards, tom lane

pgsql-performance by date:

Previous
From: Richard Huxton
Date:
Subject: Spotting planner errors (was Re: Query planner is using wrong index.)
Next
From: Richard Huxton
Date:
Subject: Re: Spotting planner errors (was Re: Query planner is using