Re: Suboptimal plan choice problem with 8.3RC2

From: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suboptimal plan choice problem with 8.3RC2
Date: 2008-01-22 22:37:39
Message-ID: 1d4e0c10801221437w66a55581m18dd41d0a79e0545@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan 22, 2008 11:22 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-01-23 08:13:55 Re: autonomous transactions
Previous Message Alvaro Herrera 2008-01-22 22:22:23 Re: Suboptimal plan choice problem with 8.3RC2