设为首页 加入收藏

TOP

Aboutstatscollected(六)
2015-11-21 01:59:46 来源: 作者: 【 】 浏览:6
Tags:Aboutstatscollected
)::numeric,2)*100 limit 19999; INSERT 0 19999 gtlions=# select count(*) from test; count ------- 79999 (1 row) gtlions=# select count(*) from test; count ------- 79999 (1 row) gtlions=# select * from pg_stats where tablename='test'; schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation ------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+------------- (0 rows) gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 1; INSERT 0 1 gtlions=# select count(*) from test; count ------- 80000 (1 row) gtlions=# select * from pg_stats where tablename='test'; schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation ------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+------------- (0 rows) gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 1; INSERT 0 1 gtlions=# select count(*) from test; count ------- 80001 (1 row) gtlions=# select * from pg_stats where tablename='test'; schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation ------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+------------- (0 rows) gtlions=# select * from pg_stats where tablename='test'; schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation ------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+------------- (0 rows) gtlions=# select relname,relfilenode,relpages,reltuples,relhasindex,relnatts from pg_class where relname in ('test') order by relname; relname | relfilenode | relpages | reltuples | relhasindex | relnatts ---------+-------------+----------+-----------+-------------+---------- test | 35889 | 0 | 0 | f | 3 (1 row) gtlions=# insert into test select generate_series(1,80000),generate_series(1,80000)||'-aaa-bbb',round(random()::numeric,2)*100 limit 10000; INSERT 0 10000 gtlions=# select count(*) from test; count ------- 90001 (1 row) gtlions=# select relname,relfilenode,relpages,reltuples,relhasindex,relnatts from pg_class where relname in ('test') order by relname; relname | relfilenode | relpages | reltuples | relhasindex | relnatts ---------+-------------+----------+-----------+-------------+---------- test | 35889 | 0 | 0 | f | 3 (1 row) gtlions=# select * from pg_stats where tablename='test'; schemaname | tablename | attname | null_frac | avg_width | n_distinct | most_common_vals | most_common_freqs | histogram_bounds | correlation ------------+-----------+---------+-----------+-----------+------------+------------------+-------------------+------------------+------------- (0 rows) gtlions=# insert into test se
首页 上一页 3 4 5 6 7 8 9 下一页 尾页 6/9/9
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇关系型数据库表结构的两个设计技巧 下一篇MongoDB数据库下载和安装

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: