Skip site navigation (1) Skip section navigation (2)

ANALYZE getting dead tuple count hopelessly wrong

From: Stuart Brooks <stuartb(at)cat(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: ANALYZE getting dead tuple count hopelessly wrong
Date: 2008-03-31 08:03:23
Message-ID: 47F09ACB.5020506@cat.co.za (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
I have a table with about 15 million rows which is constantly having 
tuples added to the head and deleted in blocks from the tail to maintain 
the size. The dead tuple count in pg_stat_user_tables tracks the deleted 
rows fairly accurately until an auto-ANALYZE is done in the background 
at which point the value it calculates is wrong by a factor of 2-3 times 
(calculated value is 30-50% of the correct value), which completely 
throws the auto-VACUUMing. An example is that the auto-VACUUM only ran 
when there were 12 million (real) dead rows! Any ideas?

Thanks
 Stuart

PS. Running 8.3.1 on NetBSD 3.

Responses

pgsql-hackers by date

Next:From: NikhilSDate: 2008-03-31 08:36:16
Subject: Re: [PATCHES] [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Previous:From: Tom LaneDate: 2008-03-31 04:26:36
Subject: Commit fest status

pgsql-general by date

Next:From: Allan KamauDate: 2008-03-31 08:18:55
Subject: Re: Removing redundant itemsets
Previous:From: Ron MayerDate: 2008-03-31 07:38:48
Subject: Re: Schema design question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group