pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Adriaan van Os <postgres@microbizz.nl>
To: pgsql-performance@postgresql.org
Subject: Re: TRUNCATE TABLE
Date: Wed, 18 Jul 2007 09:36:45 +0200
Message-ID: <469DC30D.3060603@microbizz.nl> (raw )
In-Reply-To: <25418.1184631498@sss.pgh.pa.us >
References: <46953949.3030201@microbizz.nl >
<87ps2ypox3.fsf@oxford.xeocode.com >
<46972DFA.9000900@microbizz.nl >
<20070713124435.GL31358@mathom.us >
<21495.1184337630@sss.pgh.pa.us >
<4697A58E.8060904@microbizz.nl >
<23092.1184344246@sss.pgh.pa.us >
<20070713173501.GD12109@alvh.no-ip.org >
<162867790707131212g17cbc5a9q5d098dbf01c8e502@mail.gmail.com >
<20070716213944.GA39272@nasby.net >
<25418.1184631498@sss.pgh.pa.us >
Tom Lane wrote:
> Thus the timing issue (at least as exhibited by this script) has nothing
> whatever to do with the time to delete a file, but with the time to
> create one. Since the part of DROP being timed has probably got no I/O
> involved at all (the tuples being touched are almost surely still in
> shared buffers), it's unsurprising that it is consistently fast.
In my original profiling, CREATE TEMPORARY TABLE/DROP TABLE wasn't much faster than TRUNCATE TABLE.
When I try it again now, I see that DROP TABLE is consistently fast, while the timings of CREATE
TEMPORARY TABLE vary as much as those of TRUNCATE TABLE. Your observations on the time needed to
open a file confirm that, I think.
In my test databases, autovacuum is off.
Regards,
Adriaan van Os
view thread (27+ messages) latest in thread
Message-ID: <469DC30D.3060603@microbizz.nl>
Permalink: ../469DC30D.3060603@microbizz.nl/
Also on: postgresql.org/message-id/469DC30D.3060603@microbizz.nl
copy link · copy postgr.es
reply 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: postgres@microbizz.nl
Subject: Re: TRUNCATE TABLE
In-Reply-To: <469DC30D.3060603@microbizz.nl>
* 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