Re: Slow Query- Bad Row Estimate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ozer, Pam" <pozer(at)automotive(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow Query- Bad Row Estimate
Date: 2010-10-29 21:17:30
Message-ID: 9343.1288387050@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Ozer, Pam" <pozer(at)automotive(dot)com> writes:
> Unfortunately I have not received a response on this question. Is more
> information needed? Does anyone have any ideas why the estimates may be
> bad? Or what I might be able to do to speed this up?

The most likely explanation for the bad rowcount estimates is that there
is correlation between the regionid/countyid/cityid columns, only the
planner doesn't know it. Can you reformulate that data representation
at all, or at least avoid depending on it as a join key?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2010-10-29 21:39:56 Re: Slow Query- Bad Row Estimate
Previous Message david 2010-10-29 21:14:26 Re: BBU Cache vs. spindles