Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UAO2x-00080D-8x for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Feb 2013 17:10:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UAO2w-0001Bm-Od for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Feb 2013 17:10:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UA3Hb-0001Dz-4U for pgsql-bugs@postgresql.org; Mon, 25 Feb 2013 19:00:15 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UA3HX-0000TQ-TC for pgsql-bugs@postgresql.org; Mon, 25 Feb 2013 19:00:14 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UA3HW-0008TW-AL for pgsql-bugs@postgresql.org; Mon, 25 Feb 2013 11:00:10 -0800 Date: Mon, 25 Feb 2013 11:00:10 -0800 (PST) From: jimbob To: pgsql-bugs@postgresql.org Message-ID: <1361818810310-5746602.post@n5.nabble.com> In-Reply-To: References: <1360101646.24672.YahooMailNeo@web162901.mail.bf1.yahoo.com> Subject: Re: BUG #7853: Incorrect statistics in table with many dead rows. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org So, I have some observations. Is this what you are seeing as well? So when we CLUSTER a table heavily-updated table: CLUSTER does appear to reset *n_dead_tup*, *n_tup_ins*, *n_tup_del*, *n_tup_hot_upd*, but NOT *n_live_tup* pg_stat_reset() truly clears out all the statistics counters. I tried this because *n_live_tup* is not correct. A subsequent ANALYZE will update *n_dead_tup* and *n_live_tup* to some values that could not possibly be based on the newly CLUSTERed table So, how to get correct statistics for a heavily updated table? In my experience, we only need to get the exponent correct, but we're not even getting that. BTW, I've upgraded to 8.4.15. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-7853-Incorrect-statistics-in-table-with-many-dead-rows-tp5743845p5746602.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs