From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adriaan van Os <postgres@microbizz.nl>
Cc: pgsql-performance@postgresql.org
Subject: Re: TRUNCATE TABLE
Date: Wed, 11 Jul 2007 17:54:45 -0400
Message-ID: <3561.1184190885@sss.pgh.pa.us> (raw)
In-Reply-To: <46953949.3030201@microbizz.nl>
References: <46953949.3030201@microbizz.nl>
Adriaan van Os <postgres@microbizz.nl> writes:
> Surprisingly, one of the bottlenecks is TRUNCATE TABLE and that
> command is really slow as compared to other operations.
When you don't quantify that statement at all, it's hard to make an
intelligent comment on it, but TRUNCATE per se shouldn't be slow.
Are you sure you are not measuring a delay to obtain exclusive lock
on the table before it can be truncated (ie, waiting for other
transactions to finish with it)?
regards, tom lane
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: tgl@sss.pgh.pa.us, postgres@microbizz.nl
Subject: Re: TRUNCATE TABLE
In-Reply-To: <3561.1184190885@sss.pgh.pa.us>
* 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