From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Eoin O'Hehir <eoin(dot)ohehir(at)clavisinsight(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Does VACUUM FULL need ANALYZE ? |
Date: | 2015-06-26 19:40:18 |
Message-ID: | 76082180.506975.1435347618922.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Eoin O'Hehir <eoin(dot)ohehir(at)clavisinsight(dot)com> wrote:
> I'm setting up a weekly DB maintenance job for a 9.3 server.
>
> Part of this will be a VACUUM FULL.
That's something to seriously reconsider.
> Is there any point in adding the ANALYZE option to the command ?
That and a non-FULL VACUUM command after VACUUM FULL. Unlike what
you might expect based on the FULL option, a VACUUM FULL does not
do everything that a non-FULL VACUUM does, and actually drops any
existing visibility map and free space map -- potentially making
subsequent queries against the table slower until a normal VACUUM
(or autovacuum occurs). I strongly recommend that if you really do
need to use VACUUM FULL, you immediately follow it with VACUUM
ANALYZE.
You might also want to read this:
http://rhaas.blogspot.com/2014/03/vacuum-full-doesnt-mean-vacuum-but.html
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | litu16 | 2015-06-27 02:43:48 | SELECT column WHERE (type = 'S' OR type = 'B') but perform different actions depending on whether type = 'S' or 'B' |
Previous Message | Matheus de Oliveira | 2015-06-26 19:06:09 | Re: Restore backup of database to new database name |