描述

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

格式

  1. PURGE INDEX object_name;

参数解释

参数

描述

object_name

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

示例

  • 删除放在回收站中的索引表 __recycle_$_1_1597387726700872。
  1. OceanBase(admin@test)> create table t1(c1 int);
  2. Query OK, 0 rows affected (0.09 sec)
  3. OceanBase(admin@test)> create index idx on t1(c1);
  4. Query OK, 0 rows affected (0.48 sec)
  5. OceanBase(admin@test)> drop table t1;
  6. Query OK, 0 rows affected (0.03 sec)
  7. OceanBase(admin@test)> show recyclebin;
  8. +--------------------------------+----------------------------+-------+----------------------------+
  9. | OBJECT_NAME | ORIGINAL_NAME | TYPE | CREATETIME |
  10. +--------------------------------+----------------------------+-------+----------------------------+
  11. | __recycle_$_1_1597387726700872 | __idx_1101710651081557_idx | INDEX | 2020-08-14 14:48:46.699145 |
  12. | __recycle_$_1_1597387726712976 | t1 | TABLE | 2020-08-14 14:48:46.712643 |
  13. +--------------------------------+----------------------------+-------+----------------------------+
  14. 5 rows in set (0.01 sec)
  15. OceanBase(admin@test)> purge index __recycle_$_1_1597387726700872;
  16. Query OK, 0 rows affected (0.04 sec)