On Feb 10, 2010, at 10:28 PM, Greg Smith wrote:
Ben Chobot wrote:
I'm looking at pg_stat_user_tables in 8.4.2, and I'm confused about n_live_tup. Shouldn't that be at least fairly close to (n_tup_ins - n_tup-del)? It doesn't seem to be, but I'm unclear why.
Insert 2000 tuples.
Delete 1000 tuples.
vacuum
Insert 1000 tuples. These go into the free space the deleted tuples used to be in.
analyze
n_tup_ins=3000
n_tup_del=1000
n_live_tup=3000
And unfortunately, Tom, we're not resetting stats counters. :(