Thomas SIMON <tsimon@xxxxxxxxxxx> writes: > I have strange behavior with a stat of pg_stat_user_tables (explained > below), where number of live tuples is not the real number at all. > ... > I've comparated my 10 biggest tables, only this table gave me wrong results. The pgstats stats are only approximate, but ideally they'd converge towards reality over time when they're wrong. Seems like maybe this one table has a usage pattern that's odd enough to throw things off. Maybe you have unusual autovacuum/autoanalyze parameters for it, for example? Is there anything strange about the way you insert/update/delete in it? A simpler explanation might be that this table has inheritance children --- the pgstats count would consider only the table itself, but "select count(1) from items" would scan the child tables too. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin