Re: TRUNCATE TABLE - Mailing list pgsql-performance

From Tom Lane
Subject Re: TRUNCATE TABLE
Date
Msg-id 3561.1184190885@sss.pgh.pa.us
Whole thread Raw
In response to TRUNCATE TABLE  (Adriaan van Os <postgres@microbizz.nl>)
Responses Re: TRUNCATE TABLE
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Adriaan van Os
Date:
Subject: TRUNCATE TABLE
Next
From: Gregory Stark
Date:
Subject: Re: TRUNCATE TABLE