Re: DELETE vs TRUNCATE explanation - Mailing list pgsql-performance

From Craig Ringer
Subject Re: DELETE vs TRUNCATE explanation
Date
Msg-id 4FFE2704.7020106@ringerc.id.au
Whole thread Raw
In response to Re: DELETE vs TRUNCATE explanation  (Matthew Woodcraft <matthew@woodcraft.me.uk>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Maciek Sakrejda
Date:
Subject: Re: how could select id=xx so slow?
Next
From: Craig Ringer
Date:
Subject: Re: DELETE vs TRUNCATE explanation