From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | yateen joshi <yjoshi(at)nulinkinc(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Vacuum, per table or entire database? what is better? |
Date: | 2004-08-19 08:17:38 |
Message-ID: | 41246222.1090506@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
yateen joshi wrote:
> Hi ,
>
> I am developing a script that will delete old data from various tables
> in a database periodically. The script deletes data from all the tables,
> one by one, in single go. I have two options of running vacuum here -
> One is to run vacuum analyze each time the table data is deleted, or
> another is to run vacuum analyze after the data is deleted from all the
> tables. Please note that data has been deleted from all the tables and
> not just a few tables. Also, the size of data that will be deleted may
> be different at different instances and differs from table to table.
> Which one would work faster and better, per table or entire database?
If you're going to vacuum all the tables anyway, it makes no practical
difference, you're just deciding when to do the work.
Oh - and I'd not bother analysing if you're going to bulk-reload the
tables again. Analyse them as you reload.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2004-08-19 08:20:33 | Re: select count(*) from pg_stat_activity in V8.0.0 |
Previous Message | Magnus Hagander | 2004-08-19 08:15:24 | Re: BUG: 8.0 beta1 does not run on Windows 2000 Terminal Server |