Re: Suboptimal plan choice problem with 8.3RC2 - Mailing list pgsql-hackers

From Guillaume Smet
Subject Re: Suboptimal plan choice problem with 8.3RC2
Date
Msg-id 1d4e0c10801221437w66a55581m18dd41d0a79e0545@mail.gmail.com
Whole thread Raw
In response to Re: Suboptimal plan choice problem with 8.3RC2  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Suboptimal plan choice problem with 8.3RC2  ("Guillaume Smet" <guillaume.smet@gmail.com>)
List pgsql-hackers
On Jan 22, 2008 11:22 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote:
> > So I wonder why the stats were so bad... I didn't update the data at
> > all after the initial import. Any idea?
>
> Hmm, perhaps the analyze was done with the default statistic target (10)?

It's set to 30 in the postgresql.conf from the beginning (= at least 3
weeks) and PostgreSQL has been restarted a few times (at least for the
upgrade to RC2)  so I don't think it's a configuration problem.

I just set default_statistics_target to 10 and run a few
ANALYZE+EXPLAIN ANALYZE query and the plan is the good one for all the
runs. It's set to 10 on the 8.1 box by the way.

I can't drop/recreate the database at will because the customer is
also testing it but I'll try to find a moment to do it tomorrow.

--
Guillaume


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Suboptimal plan choice problem with 8.3RC2
Next
From: Simon Riggs
Date:
Subject: Re: autonomous transactions