Re: Slow Query- Bad Row Estimate - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Slow Query- Bad Row Estimate
Date
Msg-id 4CCB3811.80900@agliodbs.com
Whole thread Raw
In response to Slow Query- Bad Row Estimate  ("Ozer, Pam" <pozer@automotive.com>)
Responses Re: Slow Query- Bad Row Estimate
List pgsql-performance
On 10/29/10 1:54 PM, Ozer, Pam wrote:
> "                    ->  Index Scan using dealergroupgeocache_i01 on
> dealergroupgeocache  (cost=0.00..5719.56 rows=9055 width=10) (actual
> time=0.015..87.689 rows=163491 loops=1)"

This appears to be your problem here.

a) when was dealergroupgeocache last ANALYZED?

b) try increasing the stats_target on dealergroupid and regionid, to say
500 and re-analyzing.

--
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com

pgsql-performance by date:

Previous
From: "Ozer, Pam"
Date:
Subject: Slow Query- Bad Row Estimate
Next
From: david@lang.hm
Date:
Subject: Re: BBU Cache vs. spindles