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

Re: [HACKERS] Question regarding effects of Vacuum, Vacuum

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Adrian Calvin <acexec(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] Question regarding effects of Vacuum, Vacuum
Date: 2002-11-19 13:46:39
Message-ID: 1037713599.83738.34.camel@jester (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-performance
Moving thread to pgsql-performance.

On Mon, 2002-11-18 at 22:02, Adrian Calvin wrote:
> Q - If many (eg hundreds) records are deleted (purposely), those
> records get flagged for later removal.  What is the best sequence of
> operations to optimize the database afterwards?  Is it Vacuum,
> Re-index, then do a Vacuum Analyze.

Just run a regular vacuum once for the above.  If you modify 10%+ of the
table (via single or multiple updates, deletes or inserts) then a vacuum
analyze will be useful.

Re-index when you change the tables contents a few times over. (Have
deleted or updated 30k entries in a table with 10k entries at any given

General maintenance for a dataset of that size will probably simply be a
nightly vacuum, weekly vacuum analyze, and annual reindex or dump /
restore (upgrades).

Rod Taylor <rbt(at)rbt(dot)ca>

In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2002-11-19 14:04:02
Subject: Re: for/loop performance in plpgsql ?
Previous:From: Federico /* juri */ PedemonteDate: 2002-11-19 09:49:26
Subject: Re: for/loop performance in plpgsql ?

pgsql-hackers by date

Next:From: Justin CliftDate: 2002-11-19 13:47:47
Subject: Re: Looking for a "Linux on Playstation 2" person to compile
Previous:From: Tom LaneDate: 2002-11-19 13:42:57
Subject: Re: char(n) to varchar or text conversion should strip

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