创建索引
标准语法
create index 索引名 on 表名(列名) tablespace 表空间名
唯一索引
create unique index 索引名 on 表名(列名) tablespace 表空间名
组合索引
create index 索引名 on 表名(列名1,列名2) tablespace 表空间名
反向键索引
create index 索引名 on 表名(列名) reverse tablespace 表空间名
示例
create index EXP_REPORT_HEADERS_N3 on EXP_REPORT_HEADERS (EXP_REPORT_TYPE_ID);
create unique index EXP_REPORT_HEADERS_U1 on EXP_REPORT_HEADERS (COMPANY_ID, EXP_REPORT_NUMBER);
删除索引
drop index [schema.]indexname
修改索引
重建索引
alter index [schema.]indexname rebuild
联机重建索引
alter index [schema.]indexname rebuild online
合并索引
alter index [schema.]indexname coalesce;