pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: pgsql-general@postgresql.org
Subject: Re: Vacuum question..
Date: Tue, 01 Oct 2002 13:07:27 +0530
Message-ID: <3D999E0F.15712.131F0DBA@localhost> (raw)
In-Reply-To: <AB815D267EC31A4693CC24D234F82916028608B8@ACCLUST02EVS1.ugd.att.com>

On 30 Sep 2002 at 20:08, Williams, Travis L, NPONS wrote:

> I have a DB that's about 1000 rows and 100 columns with 97 of them being updated every 20-30 min.  This DB is basically all of the data that I poll off of 1000 different machines thats used by different scripts.  How often should I run Vacuum?  Would I be better off doing it every time after I 
do my updates?

Well no. I would say every 15 minutes would be a good idea.

How often do you query the table? Vacuum can do three things for you.

1) Update statistics so that planner chooses correct plan thus improving 
performance.

2) Update causes dead tuples of earlier verson. Vacuum analyze marks these dead 
tuples for reuse so that resources are used efficiently.

3) Vacuum full also retrieves any lost disk space when you do a bulk delete.

Clearly in your case, (2) seems to be predominant factor. So I would say a 
vacuum analyze <tablename> for each 15 minutes will keep things in good 
shape..Even half an hour would do..


Bye
 Shridhar

--
Nachman's Rule:	When it comes to foreign food, the less authentic the better.		-
- Gerald Nachman




view thread (33+ messages)  latest in thread

Message-ID: <3D999E0F.15712.131F0DBA@localhost>
Permalink:  ../3D999E0F.15712.131F0DBA@localhost/
Also on:    postgresql.org/message-id/3D999E0F.15712.131F0DBA@localhost

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: shridhar_daithankar@persistent.co.in
  Subject: Re: Vacuum question..
  In-Reply-To: <3D999E0F.15712.131F0DBA@localhost>
  References: <AB815D267EC31A4693CC24D234F82916028608B8@ACCLUST02EVS1.ugd.att.com> <3D999E0F.15712.131F0DBA@localhost>

* 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