Re: Pointers needed on optimizing slow SQL statements - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Pointers needed on optimizing slow SQL statements
Date
Msg-id 4A2823EB.1020406@agliodbs.com
Whole thread Raw
In response to Re: Pointers needed on optimizing slow SQL statements  (Janine Sisk <janine@furfly.net>)
List pgsql-performance
On 6/3/09 7:32 PM, Janine Sisk wrote:
> I'm sorry if this is a stupid question, but...  I changed
> default_statistics_target from the default of 10 to 100, restarted PG,
> and then ran "vacuumdb -z" on the database. The plan is exactly the same
> as before. Was I supposed to do something else? Do I need to increase it
> even further? This is an overloaded system to start with, so I'm being
> fairly conservative with what I change.

It's possible that it won't change the plan; 100 is often not enough to
change the statistics.

Try changing, in a superuser session, default_statistics_target to 400
and just ANALYZing the one table, and see if that changes the plan.  If
so, you'll want to increase the statistics setting on the filtered
columns on that table.


--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

pgsql-performance by date:

Previous
From: Robert Haas
Date:
Subject: Re: Scalability in postgres
Next
From: James Mansion
Date:
Subject: Re: Scalability in postgres