pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig A. James <cjames@modgraph-usa.com>
To: pgsql-performance@postgresql.org
Subject: need vacuum after insert/truncate/insert?
Date: Thu, 06 Jul 2006 18:49:44 -0700
Message-ID: <44ADBDB8.5010008@modgraph-usa.com> (raw)
In-Reply-To: <20060706200652.50294.qmail@web55911.mail.re3.yahoo.com>
References: <20060706200652.50294.qmail@web55911.mail.re3.yahoo.com>

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?

Thanks,
Craig




view thread (2+ messages)  latest in thread

Message-ID: <44ADBDB8.5010008@modgraph-usa.com>
Permalink:  ../44ADBDB8.5010008@modgraph-usa.com/
Also on:    postgresql.org/message-id/44ADBDB8.5010008@modgraph-usa.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: cjames@modgraph-usa.com
  Subject: Re: need vacuum after insert/truncate/insert?
  In-Reply-To: <44ADBDB8.5010008@modgraph-usa.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