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=#
数据表 "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=#