Slide 23
Slide 23 text
Statistics
23
SELECT attname, avg_width, n_distinct, most_common_vals, histogram_bounds FROM pg_stats
WHERE tablename = 'postgres_roles' AND attname IN ('create_db', 'connection_limit');
-[ RECORD 1 ]----+-----------------------------------------------------------------------------
attname | connection_limit
avg_width | 4
n_distinct | 27
most_common_vals | {-1,20,5,10}
histogram_bounds | {0,0,1,3,3,6,6,30,30,40,50,50,75,100,100,200,325,500,500,999,1000,1024,2000}
-[ RECORD 2 ]----+-----------------------------------------------------------------------------
attname | create_db
avg_width | 1
n_distinct | 2
most_common_vals | {f,t}
histogram_bounds |
The pg_stats system view