On Wed, Jul 7, 2010 at 10:39 AM, damien hostin <damien.hostin@xxxxxxxxx> 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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance