X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E3B149F97C2 for ; Thu, 6 Jul 2006 23:50:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 08333-05 for ; Thu, 6 Jul 2006 23:50:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moonunit2.moonview.localnet (wsip-70-167-125-69.sd.sd.cox.net [70.167.125.69]) by postgresql.org (Postfix) with ESMTP id 995269F94F3 for ; Thu, 6 Jul 2006 23:50:21 -0300 (ADT) Received: from [192.168.0.3] (moonunit3.moonview.localnet [192.168.0.3]) by moonunit2.moonview.localnet (8.13.1/8.13.1) with ESMTP id k67357uq006379 for ; Thu, 6 Jul 2006 20:05:08 -0700 Message-ID: <44ADBDB8.5010008@modgraph-usa.com> Date: Thu, 06 Jul 2006 18:49:44 -0700 From: "Craig A. James" User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: need vacuum after insert/truncate/insert? References: <20060706200652.50294.qmail@web55911.mail.re3.yahoo.com> In-Reply-To: <20060706200652.50294.qmail@web55911.mail.re3.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/57 X-Sequence-Number: 19917 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