Re: truncate vs. delete

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org, "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Subject: Re: truncate vs. delete
Date: 2008-07-24 13:58:10
Message-ID: 157308.45947.qm@web59509.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

The truncate is more fast to delete, the truncate command not scan the table

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

--- On Thu, 7/24/08, A. Kretschmer <andreas(dot)kretschmer(at)schollglas(dot)com> wrote:

> From: A. Kretschmer <andreas(dot)kretschmer(at)schollglas(dot)com>
> Subject: Re: [SQL] truncate vs. delete
> To: pgsql-sql(at)postgresql(dot)org
> Date: Thursday, July 24, 2008, 1:53 PM
> 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.
>
>
> Andreas
> --
> Andreas Kretschmer
> Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr:
> -> Header)
> GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA
> http://wwwkeys.de.pgp.net
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Emi Lu 2008-07-24 14:01:46 Re: truncate vs. delete
Previous Message A. Kretschmer 2008-07-24 13:53:49 Re: truncate vs. delete