pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabi@logix-tt.com>
To: Craig A. James <cjames@modgraph-usa.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: need vacuum after insert/truncate/insert?
Date: Fri, 07 Jul 2006 10:32:07 +0200
Message-ID: <44AE1C07.60009@logix-tt.com> (raw)
In-Reply-To: <44ADBDB8.5010008@modgraph-usa.com>
References: <20060706200652.50294.qmail@web55911.mail.re3.yahoo.com>
	<44ADBDB8.5010008@modgraph-usa.com>

Hi, Craig,

Craig A. James wrote:
> If I insert a bunch of rows, then truncate, then insert a bunch more
> rows, do I need to vacuum?  I've been assuming that TRUNCATE TABLE is a
> brute-force technique that more-or-less tosses the old table and starts
> fresh so that no vacuum is necessary.
> 
> Second question: Same scenario as above, but now the table has indexes. 
> Is a reindex needed, or are the indexes they "truncated" too?

AFAIK, both table and indices are "cut down" nicely.

But you will need an ANALYZE after refilling of the table, to have
current statistics.


HTH,
Markus


-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org



view thread (2+ messages)

Message-ID: <44AE1C07.60009@logix-tt.com>
Permalink:  ../44AE1C07.60009@logix-tt.com/
Also on:    postgresql.org/message-id/44AE1C07.60009@logix-tt.com

 · 

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: schabi@logix-tt.com, cjames@modgraph-usa.com
  Subject: Re: need vacuum after insert/truncate/insert?
  In-Reply-To: <44AE1C07.60009@logix-tt.com>

* 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