1. 首页 > ITPUX技术网 > 正文

impdp include=table_data与content=data_only的区别

在使用数据泵导入时,为了加快导入速度先是将表上索引禁用:

alter index SYS_C0061367 unusable;
alter table my_test disable constraint SYS_C0061367;
alter index idx_mt_y unusable;

然后使用数据泵导入:

impdp \’/ as sysdba\’ directory=foss_dump dumpfile=my_test01.dmp tables=iawr.my_test include=table_data table_exists_action=truncate
impdp \’/ as sysdba\’ directory=foss_dump dumpfile=my_test01.dmp tables=iawr.my_test content=data_only table_exists_action=truncate

最后并行重建索引:

alter index idx_mt_y rebuild online compute statistics parallel 4;
alter index idx_mt_y noparallel;

alter table my_test enable constraint SYS_C0061367;
alter index SYS_C0061367 rebuild online compute statistics parallel 4;
alter index SYS_C0061367 noparallel;

今天在操作期间,发现使用content=data_only时,索引最后都自动被重建
而使用include=data_only时,索引一直处于unusable状态,这样看这两个
选项还是有些区别的。

本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html

联系我们

在线咨询:点击这里给我发消息

微信号:itpux-com

工作日:9:30-18:30,节假日休息