Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6635E9FCB83 for ; Sat, 10 Nov 2007 13:08:36 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 16320-03-4 for ; Sat, 10 Nov 2007 13:08:28 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E0B8B9F99FC for ; Sat, 10 Nov 2007 13:08:12 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lAAH8BEW016628; Sat, 10 Nov 2007 12:08:11 -0500 (EST) To: Jean-David Beyer cc: pgsql performance Subject: Re: Curious about dead rows. In-reply-to: <4735DBDB.5050208@verizon.net> References: <4735DBDB.5050208@verizon.net> Comments: In-reply-to Jean-David Beyer message dated "Sat, 10 Nov 2007 11:27:07 -0500" Date: Sat, 10 Nov 2007 12:08:11 -0500 Message-ID: <16627.1194714491@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/163 X-Sequence-Number: 27578 Jean-David Beyer writes: > I am doing lots of INSERTs on a table that starts out empty (I did a > TRUNCATE on it). I am not, AFAIK, doing DELETEs or UPDATEs. Autovacuum is > on. I moved logging up to debug2 level to see what was going on, and I get > things like this: > "vl_as": scanned 3000 of 5296 pages, containing 232944 live rows and 1033 > dead rows; 3000 rows in sample, 411224 estimated total rows > A little later, it says: > "vl_as": scanned 3000 of 6916 pages, containing 233507 live rows and 493 > dead rows; 3000 rows in sample, 538311 estimated total rows Well, *something* is doing deletes or updates in that table. Better look a bit harder at your application ... regards, tom lane