Skip site navigation (1) Skip section navigation (2)

truncate vs. delete

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: truncate vs. delete
Date: 2008-07-24 13:34:16
Message-ID: 488884D8.1070406@encs.concordia.ca (view raw or flat)
Thread:
Lists: pgsql-sql
Good morning,

If I remember correctly, "delete" does not release space, while truncate 
will.

I have an option now

(1) Use object creator(with create/drop permission which I do not need 
in my cronjob script) to truncate table1(>100,000 recs) records

(2) Use user1(has r/w only) to delete from table1, then vacuum it

May I know how inefficient "delete from" comparing to truncate please?

Thanks a lot!



Responses

pgsql-sql by date

Next:From: Emi LuDate: 2008-07-24 13:47:48
Subject: Re: truncate vs. delete
Previous:From: Anoop GDate: 2008-07-24 12:56:50
Subject: postgres time zone settings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group