云数据库 GAUSSDB-VACUUM:示例

时间:2024-01-23 20:08:53

示例

1
2
3
4
5
6
7
8
9
--在表tpcds.reason上创建索引
CREATE UNIQUE INDEX ds_reason_index1 ON tpcds.reason(r_reason_sk);

--对带索引的表tpcds.reason执行VACUUM操作。
postgres=# VACUUM (VERBOSE, ANALYZE) tpcds.reason;

--删除索引
postgres=# DROP INDEX ds_reason_index1 CASCADE;
postgres=# DROP TABLE tpcds.reason;
support.huaweicloud.com/devg-v1-gaussdb/gaussdb_devg_0643.html