Re: Slow query with planner row strange estimation - Mailing list pgsql-performance

From Robert Haas
Subject Re: Slow query with planner row strange estimation
Date
Msg-id AANLkTimauId9FvRbYGvnpcnwBSk7Yuyd6LREavGM72Eu@mail.gmail.com
Whole thread Raw
In response to Re: Slow query with planner row strange estimation  (damien hostin <damien.hostin@axege.com>)
Responses Re: Slow query with planner row strange estimation
List pgsql-performance
On Wed, Jul 7, 2010 at 10:39 AM, damien hostin <damien.hostin@axege.com> wrote:
> Hello again,
>
> At last, I check the same query with the same data on my desktop computer.
> Just after loading the data, the queries were slow, I launch a vaccum
> analyse which collect good stats on the main table, the query became quick
> (~200ms). Now 1classic sata disk computer is faster than our little monster
> server !!

Have you tried running ANALYZE on the production server?

You might also want to try ALTER TABLE ... SET STATISTICS to a large
value on some of the join columns involved in the query.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-performance by date:

Previous
From: Ryan Wexler
Date:
Subject: Fwd: performance on new linux box
Next
From: Robert Haas
Date:
Subject: Re: [Slony1-general] WAL partition overloaded--by autovacuum?