Re: Auto-ANALYZE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig James <craig_james(at)emolecules(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Auto-ANALYZE?
Date: 2007-05-23 23:55:58
Message-ID: 26268.1179964558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Craig James <craig_james(at)emolecules(dot)com> writes:
> Auto-vacuum has made Postgres a much more "friendly" system. Is there some reason the planner can't also auto-ANALYZE in some situations?

autovacuum handles analyze too. Trying to make the planner do it is
a crummy idea for a couple of reasons:

* unpredictable performance if queries sometimes go off for a few
seconds to collect stats
* pg_statistics update requires semi-exclusive lock
* work is lost if transaction later rolls back

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Leandro Guimarães dos Santos 2007-05-24 02:01:24 Memory allocation and Vacuum abends
Previous Message Craig James 2007-05-23 23:46:54 Auto-ANALYZE?