From: Craig Ringer <ringerc@ringerc.id.au>
To: Matthew Woodcraft <matthew@woodcraft.me.uk>
Cc: pgsql-performance@postgresql.org
Subject: Re: DELETE vs TRUNCATE explanation
Date: Thu, 12 Jul 2012 09:23:16 +0800
Message-ID: <4FFE2704.7020106@ringerc.id.au> (raw)
In-Reply-To: <20120711181037.GF11608@golux.woodcraft.me.uk>
References: <20120711181037.GF11608@golux.woodcraft.me.uk>
On 07/12/2012 02:10 AM, Matthew Woodcraft wrote:
> I think a documentation change would be worthwhile. At the moment the
> TRUNCATE page says, with no caveats, that it is faster than
> unqualified DELETE.
+1 to updating the docs to reflect the fact that TRUNCATE may have a
higher fixed cost than DELETE FROM table; but also prevents bloat.
It's a weird little corner case, but with database-backed unit testing
it's going to become a more significant one whether or not it feels like
it makes any sense.
--
Craig Ringer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ringerc@ringerc.id.au, matthew@woodcraft.me.uk
Subject: Re: DELETE vs TRUNCATE explanation
In-Reply-To: <4FFE2704.7020106@ringerc.id.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox