From: | "Ozer, Pam" <pozer(at)automotive(dot)com> |
---|---|
To: | "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Slow Query- Bad Row Estimate |
Date: | 2010-10-29 21:47:55 |
Message-ID: | 216FFB77CBFAEE4B8EE4DF0A939FF1D1018359@mail-001.corp.automotive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
I had just analyzed the dealergroupgeochache table. Wow. Thank you. That did the trick. Can you give me an explanation of the default_stats work? I don't think I completely understand what it means when you set it to 500 instead of 1000?
thanks
-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org [mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Josh Berkus
Sent: Friday, October 29, 2010 2:10 PM
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Slow Query- Bad Row Estimate
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
--
Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-10-29 21:48:59 | Re: [PERFORM] typoed column name, but postgres didn't grump |
Previous Message | Ozer, Pam | 2010-10-29 21:45:52 | Re: Slow Query- Bad Row Estimate |