pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jimbob <skaggs.james@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #7853: Incorrect statistics in table with many dead rows.
Date: Mon, 25 Feb 2013 11:00:10 -0800 (PST)
Message-ID: <1361818810310-5746602.post@n5.nabble.com> (raw)
In-Reply-To: <CAMkU=1x2SNdDqdRVQUMzkZiDW_Vbx73z1obhw8HQ7eQSyiORDQ@mail.gmail.com>
References: <E1U2nS6-0003ky-CY@wrigleys.postgresql.org>
	<1360101646.24672.YahooMailNeo@web162901.mail.bf1.yahoo.com>
	<CAMkU=1yE4Dwr0a7GPKMZjxMUiT6qSY=2Y1oF79myhdkxwWTu_A@mail.gmail.com>
	<CAMkU=1x2SNdDqdRVQUMzkZiDW_Vbx73z1obhw8HQ7eQSyiORDQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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-t...
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



view thread (11+ messages)  latest in thread

Message-ID: <1361818810310-5746602.post@n5.nabble.com>
Permalink:  ../1361818810310-5746602.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1361818810310-5746602.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: skaggs.james@gmail.com
  Subject: Re: BUG #7853: Incorrect statistics in table with many dead rows.
  In-Reply-To: <1361818810310-5746602.post@n5.nabble.com>
  References: <E1U2nS6-0003ky-CY@wrigleys.postgresql.org> <1360101646.24672.YahooMailNeo@web162901.mail.bf1.yahoo.com> <CAMkU=1yE4Dwr0a7GPKMZjxMUiT6qSY=2Y1oF79myhdkxwWTu_A@mail.gmail.com> <CAMkU=1x2SNdDqdRVQUMzkZiDW_Vbx73z1obhw8HQ7eQSyiORDQ@mail.gmail.com> <1361818810310-5746602.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox