Re: Auto-ANALYZE? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Auto-ANALYZE?
Date
Msg-id 26268.1179964558@sss.pgh.pa.us
Whole thread Raw
In response to Auto-ANALYZE?  (Craig James <craig_james@emolecules.com>)
List pgsql-performance
Craig James <craig_james@emolecules.com> writes:
> Auto-vacuum has made Postgres a much more "friendly" system.  Is there some reason the planner can't also
auto-ANALYZEin 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

pgsql-performance by date:

Previous
From: Craig James
Date:
Subject: Auto-ANALYZE?
Next
From: Tom Lane
Date:
Subject: Re: [PERFORM] does VACUUM ANALYZE complete with this error?