Re: Vacuum question..

From: "Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Vacuum question..
Date: 2002-10-01 07:37:27
Message-ID: 3D999E0F.15712.131F0DBA@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Achilleus Mantzios 2002-10-01 07:49:41 Re: [SQL] arrays
Previous Message Yury Bokhoncovich 2002-10-01 07:27:27 Re: 7.0 -> 7.2 Migration (oops)