Re: Strange behaviour with a query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Iñigo Martinez Lasala <imartinez(at)vectorsf(dot)com>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Strange behaviour with a query
Date: 2009-04-17 14:37:18
Message-ID: 20715.1239979038@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

=?ISO-8859-1?Q?I=F1igo?= Martinez Lasala <imartinez(at)vectorsf(dot)com> writes:
> ANALYZE;
> And everything working like a charm....

> What is the reason for this to happen? Is it common?

It sounds like you might never have ANALYZEd the database at all, or
anyway not have done so recently. Recommended practice is to ANALYZE
at least as often as you vacuum. Or turn on autovacuum and let it
take care of it.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Enrico Weigelt 2009-04-19 16:33:46 pg_dumpall + pgdump_oid table + incremental backup
Previous Message Iñigo Martinez Lasala 2009-04-17 12:00:45 Re: Strange behaviour with a query