Re: Oddball data distribution giving me planner headaches

From: Jeff Amiel <becauseimjeff(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, David Johnston <polobo(at)yahoo(dot)com>
Subject: Re: Oddball data distribution giving me planner headaches
Date: 2011-12-02 22:06:34
Message-ID: 1322863594.24224.YahooMailClassic@web65509.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- On Fri, 12/2/11, David Johnston <polobo(at)yahoo(dot)com> wrote:

> From: David Johnston <polobo(at)yahoo(dot)com>

> ---------------------------------------------------------
> My, possibly naïve, observation:
>
> So aside from the fact the estimates seem to be off the
> planner has still
> chosen the most effective plan?  In that situation no
> matter how accurate
> you get the statistics you will not gain any performance
> because the planner
> will never choose a different plan.
>
Thanks.....
I'm not interested in optimizing this query.....it's fast and efficient. However, the planner thinks that it is going to return a million rows when it is only going to return one thousand. When this query is used as an element of a BIGGER query, that causes me all sorts of planner issues....
That's the problem I am trying to solve...why the planner is 3 orders of magnitude off in row estimation.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-12-02 22:09:03 Re: Oddball data distribution giving me planner headaches
Previous Message Tom Lane 2011-12-02 21:54:49 Re: \dT+ does not give elements ?