全部产品

PURGE INDEX

描述

该语句用来删除放在回收站中的索引表。

格式

 PURGE INDEX object_name;

参数解释

参数

描述

object_name

对象进入回收站后的新名字

示例

  • 删除放在回收站中的索引 RECYCLE_$_2_1615970480497000。

obclient>CREATE TABLE t1(c1 INT);
Query OK, 0 rows affected (0.09 sec)

obclient>CREATE INDEX idx ON t1(c1);
Query OK, 0 rows affected (0.48 sec)

obclient>DROP TABLE t1;
Query OK, 0 rows affected (0.03 sec)

obclient>SHOW RECYCLEBIN;
+------------------------------+----------------------------+-------+------------------------------+
| OBJECT_NAME                  | ORIGINAL_NAME              | TYPE  | CREATETIME                   |
+------------------------------+----------------------------+-------+------------------------------+
| RECYCLE_$_2_1615970480497000 | __idx_1102810162709362_IDX | INDEX | 17-MAR-21 04.41.20.497680 PM |
| RECYCLE_$_2_1615970480507000 | T1                         | TABLE | 17-MAR-21 04.41.20.507102 PM |
+------------------------------+----------------------------+-------+------------------------------+
2 rows in set (0.00 sec)

obclient> PURGE RECYCLE_$_2_1615970480497000;
Query OK, 0 rows affected (0.04 sec)