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

Re: Clarification required: autovacuum and VACUUM command mode

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Narasimha Murthy-VRFX87" <VRFX87(at)motorola(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Clarification required: autovacuum and VACUUM command mode
Date: 2010-05-14 14:47:46
Message-ID: 4BED1C420200002500031737@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
"Narasimha Murthy-VRFX87" <VRFX87(at)motorola(dot)com> wrote:
 
> Another query: I do not want to run Analyze. However, auto-vacuum
> runs both both VACUUM and ANALYZE. I do not see any option to
> disable running ANALYZE during auto-vacuum. Is there any way to
> achive this?
 
Usually it's best to run ANALYZE more often than VACUUM, since the
statistics generated by ANALYZE are used to choose the most
efficient plan, and ANALYZE runs faster because it just takes a
random sample of rows.  Out-of-date statistics are one of the most
common causes of slow queries.  That's not to say there couldn't be
some very unusual circumstances under which it might make sense to
disable ANALYZE, but I'm highly skeptical.
 
Anyway, if you *really* want to shoot that fly off the end of your
toe (to stretch a metaphor), you could adjust the autovacuum
settings related to analyze to really high values.
 
-Kevin

In response to

Responses

pgsql-admin by date

Next:From: Kevin GrittnerDate: 2010-05-14 14:56:55
Subject: Re: List traffic
Previous:From: Marc G. FournierDate: 2010-05-14 14:44:38
Subject: Re: List traffic

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