数据仓库服务 GAUSSDB(DWS)-PG_STAT_LAST_OPERATION:应用示例

时间:2023-11-22 14:18:31

应用示例

查看表上一次执行DDL时相关的信息:

1
2
3
4
5
6
SELECT * FROM PG_STAT_LAST_OPERATION;
 classid | objid | staactionname | stasysid |            statime            |   csn   | stasubtype
---------+-------+---------------+----------+-------------------------------+---------+-------------
    1259 | 20163 | CREATE        |       10 | 2023-01-04 14:37:31.477995+08 |  282450 | TABLE
    1259 | 20163 | VACUUM        |       10 | 2023-01-05 18:03:19.579291+08 | 1282717 | VACUUM FULL
(2 rows)
support.huaweicloud.com/devg-820-dws/dws_04_1038.html