On Wed, Jun 3, 2009 at 8:32 PM, Janine Sisk <janine@furfly.net> 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.
No need to restart pg, just analyze is good enough (vacuumdb -z will do).
After that, compare your explain analyze output and see if the
estimates are any better. If they're better but not good enough, try
increasing stats target to something like 500 or 1000 (max is 1000)
and reanalyze and see if that helps. If not, post the new explain
analyze and we'll take another whack at it.