pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig James <craig_james@emolecules.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Auto-ANALYZE?
Date: Wed, 23 May 2007 19:55:58 -0400
Message-ID: <26268.1179964558@sss.pgh.pa.us> (raw)
In-Reply-To: <4654D26E.1020208@emolecules.com>
References: <4654D26E.1020208@emolecules.com>

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-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



view thread (2+ messages)

Message-ID: <26268.1179964558@sss.pgh.pa.us>
Permalink:  ../26268.1179964558@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26268.1179964558@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, craig_james@emolecules.com
  Subject: Re: Auto-ANALYZE?
  In-Reply-To: <26268.1179964558@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox