pg_stats explained ... ?
Morning all ...
Can someone explain to me how I should read this:
tablename | attname | avg_width | n_distinct
-------------------------+----------------------------+-----------+------------
iwantu_pro_week | uid | 8 | -1
iwantu_pro_week | pro_week_agent | 9 | 9
iwantu_pro_week | pro_week_time | 8 | -0.976321
iwantu_pro_week | pro_week_post | 5 | 2
iwantu_pro_week | pro_week_club | 2 | 1
n_distinct, I'm taking it, of -1 means its a UNIQUE INDEX, and the
positive numbers are exact #'s ... but, -0.976321? :)
Also, how is the avg_width interpreted?
"Marc G. Fournier" <scrappy@hub.org> writes:
n_distinct, I'm taking it, of -1 means its a UNIQUE INDEX, and the
positive numbers are exact #'s ... but, -0.976321? :)
"Almost unique", evidently. See stadistinct at
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/catalog-pg-statistic.html
Also, how is the avg_width interpreted?
Just what you'd expect: average stored width, in bytes, of non-NULL
entries in the column.
regards, tom lane