From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Mark Dexter <MDEXTER(at)dexterchaney(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: VACUUM and ANALYZE Follow-Up |
Date: | 2004-11-29 23:09:25 |
Message-ID: | 20041129230925.GC30997@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Nov 29, 2004 at 02:57:28PM -0800, Mark Dexter wrote:
> 1. Why run VACUUM on an empty table?
Another approach: you run VACUUM on an empty table to empty it. If you
had a table with a lot of tuples, and ran DELETE on it, it will empty
after that, but it will be full of dead tuples. So you have to VACUUM
it to reclaim space.
Of course it would be better to use TRUNCATE rather than DELETE, but
that doesn't always work (e.g. because the table has foreign keys).
--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"This is a foot just waiting to be shot" (Andrew Dunstan)
From | Date | Subject | |
---|---|---|---|
Next Message | Mage | 2004-11-29 23:34:02 | Re: VACUUM and ANALYZE Follow-Up |
Previous Message | Mark Dexter | 2004-11-29 22:57:28 | Re: VACUUM and ANALYZE Follow-Up |