Re: Wrong stat on pg_stat_user_tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux