pg_stats explained ... ?
pg_stats explained ... ?
От:
"Marc G. Fournier" <scrappy@hub.org>
Дата:
Morning all ...
Can someone explain to me how I should read this:
tablename | attname | avg_width | n_distinct
-------------------------+----------------------------+-----------+------------iwantu_pro_week | uid | 8 | -1iwantu_pro_week | pro_week_agent | 9 | 9iwantu_pro_week | pro_week_time | 8 | -0.976321iwantu_pro_week | pro_week_post | 5 | 2iwantu_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?
Re: pg_stats explained ... ?
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Marc G. Fournier" 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