Re: question on TRUNCATE vs VACUUM FULL

From: Chris <dmagick(at)gmail(dot)com>
To: Mark Steben <msteben(at)autorevenue(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: question on TRUNCATE vs VACUUM FULL
Date: 2008-03-19 01:10:37
Message-ID: 47E0680D.6020101@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


>
> So my question is this: Shouldn’t VACUUM FULL clean Table C and reclaim
> all its space?

You've got concepts mixed up.

TRUNCATE deletes all of the data from a particular table (and works in
all dbms's).

http://www.postgresql.org/docs/8.3/interactive/sql-truncate.html

VACUUM FULL is a postgres-specific thing which does work behind the
scenes to clean up MVCC left-overs. It does not touch any current data
or records in the table, it's purely behind the scenes work.

http://www.postgresql.org/docs/current/interactive/sql-vacuum.html

The two have completely different uses and nothing to do with each other
what-so-ever.

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig Ringer 2008-03-19 01:13:44 Re: What is the best way to storage music files in Postgresql
Previous Message Gregory Youngblood 2008-03-19 01:03:53 Re: What is the best way to storage music files in Postgresql