1、创建一个单一的索引:
create index 索引名称 on 表名(列名);
2、创建复合索引
create index 索引名称 on 表名(列名1,列名2);
3、删除索引
drop index 索引名称;
4、查询表的索引
select * from all_indexes where table_name = '表名称';
5、查询表的索引列
select* from all_ind_columns where table_name = '表名称';
6、索引表空间
select 'alter index' ||index_name|| 'rebuild tablespace tbs_name;' index_name from dba_indexes where wner='%***%' and table_name like '%***%'
7、表空间迁移
select 'alter table' ||table_name|| 'move tablespace tbs_name;' table_name from dba_tables where wner='%***%' and table_name like '%***%'
8、带lob字段
select 'alter table' ||table_name|| 'move lob('||index_name||') store as (tablespace tbs_name);' from dba_indexes where wner='%***%' and index_name like '%***%'
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




