--移到一个表空间
select 'alter table kt.'||t.table_name||' move tablespace TS_WORKFLOW_10M_01 parallel 10;' ,t.table_name,t.tablespace_name from DBA_TABLES T
where t.table_name like 'I_PS_PROVISION_RESET' and t.owner='KT';
--移回来
select 'alter table kt.'||t.table_name||' move tablespace TS_TIME_IDX_1M_35 parallel 10;' ,t.table_name,t.tablespace_name from DBA_TABLES T
where t.table_name like 'I_PS_PROVISION_RESET' and t.owner='KT';
--索引重建
select 'alter index kt.'||t.index_name||' rebuild parallel 10;',t.*
from dba_indexes t where t.table_name like 'I_PS_PROVISION_RESET' and t.owner='KT';
--去掉并行信息
select 'alter index kt.'||t.index_name||' noparallel;',t.*
from dba_indexes t where t.table_name like 'I_PS_PROVISION_RESET' and t.owner='KT';
重建流水表
最新推荐文章于 2025-08-01 17:32:45 发布
本文介绍了一种针对特定表(I_PS_PROVISION_RESET)在Oracle数据库中进行表空间迁移的方法,并提供了并行处理和索引重建的SQL脚本。通过这些脚本可以将表从一个表空间移动到另一个表空间,并进行索引的并行重建及后续的优化。
1103

被折叠的 条评论
为什么被折叠?



