Re: truncate vs. delete - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: truncate vs. delete
Date
Msg-id 20080724141711.GE27348@a-kretschmer.de
Whole thread Raw
In response to Re: truncate vs. delete  (Emi Lu <emilu@encs.concordia.ca>)
Responses Re: truncate vs. delete
List pgsql-sql
am  Thu, dem 24.07.2008, um 10:01:46 -0400 mailte Emi Lu folgendes:
> A. Kretschmer wrote:
> >am  Thu, dem 24.07.2008, um  9:47:48 -0400 mailte Emi Lu folgendes:
> >>I found a link for SQL Server, it applies to PostgreSQL 8.0.x as well?
> >>http://vadivel.blogspot.com/2004/06/delete-vs-truncate-statement.html
> >
> >Not realy, for instance, pg can rollback a truncate, and a sequence are
> >not reset.
> >
> >
> Thank you. I am quite sure that I will not use "delete" now.
> Now I a question about how efficient between
> 
> (1) truncate a big table (with 200, 000)
>     vacuum it (optional?)

not required


>     drop primary key
>     load new data
>     load primary ke
>     vacuum it

analyse it, instead vacuum.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


pgsql-sql by date:

Previous
From: Emi Lu
Date:
Subject: Re: truncate vs. delete
Next
From: "Scott Marlowe"
Date:
Subject: Re: truncate vs. delete