Skip site navigation (1) Skip section navigation (2)

Re: Auto ANALYZE criteria

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Auto ANALYZE criteria
Date: 2010-09-21 02:12:31
Message-ID: 21216.1285035151@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)com> writes:
> The autovacuum daemon currently uses the number of inserted and
> updated tuples to determine if it should run VACUUM ANALYZE on a
> table. Why doesnt it consider deleted tuples as well?

I think you misread the code.

Now there *is* a problem, pre-9.0, if your update pattern is such that
most or all updates are HOT updates.  To quote from the 9.0 alpha
release notes:

         Revise pgstat's tracking of tuple changes to
         improve the reliability of decisions about when to
         auto-analyze.  The previous code depended on n_live_tuples +
         n_dead_tuples - last_anl_tuples, where all three of these
         numbers could be bad estimates from ANALYZE itself.  Even
         worse, in the presence of a steady flow of HOT updates and
         matching HOT-tuple reclamations, auto-analyze might never
         trigger at all, even if all three numbers are exactly right,
         because n_dead_tuples could hold steady.

It's not clear to me if that matches your problem, though.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Greg SmithDate: 2010-09-21 04:20:39
Subject: Memory speed testing
Previous:From: Kevin GrittnerDate: 2010-09-20 22:28:53
Subject: Re: Auto ANALYZE criteria

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group