您的位置:首页 > 其它

HGDB使用analyze搜集表的统计信息

2017-10-20 11:22 369 查看
highgo=# \d test;

  数据表 "public.test"

 栏位 |  类型   | 修饰词

------+---------+--------

 id   | integer |

索引:

    "t1_idx" btree (id)

highgo=# select schemaname ,relname,last_analyze from pg_stat_all_tables where relname='test';

 schemaname | relname |         last_analyze

------------+---------+-------------------------------

 public     | test    | 2017-10-05 11:15:35.877243+08

(1 行记录)

highgo=# \! time

当前时间: 11:21:33.07

输入新时间:

highgo=# analyze test;

ANALYZE

highgo=# select schemaname ,relname,last_analyze from pg_stat_all_tables where relname='test';

 schemaname | relname |         last_analyze

------------+---------+-------------------------------

 public     | test    | 2017-10-05 11:21:42.321886+08

(1 行记录)

highgo=#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: