Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id C4AF72E2D65 for ; Wed, 14 Nov 2007 08:57:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 03062-08 for ; Wed, 14 Nov 2007 08:57:24 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 8AF632E2D3C for ; Wed, 14 Nov 2007 08:57:48 -0400 (AST) Received: from perhan.alvh.no-ip.org (190-95-16-8.bk17-dsl.surnet.cl [190.95.16.8]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lAECvhtK023362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Nov 2007 04:57:46 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 04C5347C0D; Wed, 14 Nov 2007 09:58:08 -0300 (CLST) Date: Wed, 14 Nov 2007 09:58:08 -0300 From: Alvaro Herrera To: Jean-David Beyer Cc: pgsql performance Subject: Re: Curious about dead rows. Message-ID: <20071114125808.GO19014@alvh.no-ip.org> References: <4735DBDB.5050208@verizon.net> <16627.1194714491@sss.pgh.pa.us> <4735FA9F.1080805@verizon.net> <473A5CC0.3060003@verizon.net> <473AE63D.7090305@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <473AE63D.7090305@verizon.net> User-Agent: Mutt/1.5.16 (2007-06-11) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 14 Nov 2007 04:57:46 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/211 X-Sequence-Number: 27626 Jean-David Beyer wrote: > How do I reset the counters in pg_stat_database and pg_stat_all_tables? > I tried just restarting postgres, but it seems to be saved in the database, > not just in the RAM of the server. There is a function called pg_stat_reset() or some such. > I suppose that blks_read and blks_hit are zero because there are 8 GBytes > RAM on this machine and I give 2GBytes to shared_buffers = 253000 so that > all sits in RAM. Perhaps you have stats_block_level set to off? > I know there have been rollbacks but I do a REINDEX, CLUSTER, and VACUUM > ANALYZE before starting the inserts in question. You do all three on the same tables? That seems pretty pointless. A sole CLUSTER has the same effect. > Do I need to do a VACUUM FULL ANALYZE instead? No. -- Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4" "There was no reply" (Kernel Traffic)