Re: DELETE TABLE xx do not erase index file after a vacuum full ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hervé Piedvache <herve(at)elma(dot)fr>
Cc: pgsql General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: DELETE TABLE xx do not erase index file after a vacuum full ?
Date: 2004-07-01 17:22:55
Message-ID: 28656.1088702575@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-15?q?Herv=E9_Piedvache?= <herve(at)elma(dot)fr> writes:
> I have done a :
> DELETE from my_table;

TRUNCATE would serve you a lot better.

For major reductions in table size VACUUM FULL is not the best tool;
you really want to reconstruct the indexes from scratch. Consider
REINDEX, CLUSTER, or (in this case) TRUNCATE.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message wespvp 2004-07-01 17:45:10 max_fsm_pages
Previous Message Tom Lane 2004-07-01 16:49:35 Re: Problems restarting after database crashed (signal 11).