Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 0FD9F9FB25A for ; Sat, 21 Oct 2006 02:02:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 32310-06 for ; Sat, 21 Oct 2006 05:02:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 92FEF9FA5B5 for ; Sat, 21 Oct 2006 02:02:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9L526mo021642; Sat, 21 Oct 2006 01:02:06 -0400 (EDT) To: "Steve Oualline" cc: pgsql-performance@postgresql.org, "Jiu Zheng" Subject: Re: VACUUM Performance In-reply-to: <00C5463E8A5F7C41A8396D701A6734B1527A62@mail01.stbernard.com> References: <00C5463E8A5F7C41A8396D701A6734B1527A62@mail01.stbernard.com> Comments: In-reply-to "Steve Oualline" message dated "Fri, 20 Oct 2006 14:42:30 -0700" Date: Sat, 21 Oct 2006 01:02:06 -0400 Message-ID: <21641.1161406926@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/455 X-Sequence-Number: 21584 "Steve Oualline" writes: > Question: I have a big table with 120,000,000 records. > Let's assume that I DELETE 4,000,000 records, VACUUM FULL, and REINDEX. > Now I have the same table, but with 240,000,000 records. > I DELETE 8,000,000 records, VACUUM FULL, and REINDEX. > Should the second operation with twice the data take twice the time as = > the first? At least. If you intend to reindex all the indexes, consider instead doing DROP INDEX(es) VACUUM FULL re-create indexes as this avoids the very large amount of effort that VACUUM FULL puts into index maintenance --- effort that's utterly wasted if you then reindex. CLUSTER and some forms of ALTER TABLE can accomplish a table rewrite with less hassle than the above, although strictly speaking they violate MVCC by discarding recently-dead tuples. regards, tom lane