关于Oracle数据库中行迁移/行链接的问题[24]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 coolyl 的 blog

3.    imp开始导出的表。

4.    重建表上所有的索引。(可选)

使用这种方法可以不用重建索引,省去了这部分时间,但是完成之后索引的使用效率不会很高,最好是在以后逐步的在线重建索引,这样是可以不需要中断业务的。但是需要考虑的是imp的时候会比较慢,而且会占用比较大的io,应该选择在应用不是很繁忙的时候做这项工作,否则会对应用的正常运行产生较大的影响。对于这种方法还存在有一个比较大的弊端,就是在exp表的时候要保证该表是没有数据的更新或者是只读状态的,不能对表有插入或者更新操作,否则会导致数据的丢失。

sql> select count(*) from test;

  count(*)

----------

169344

sql> truncate table chained_rows;

table truncated.

sql> analyze table test list chained rows into chained_rows;

table analyzed.

sql> select count(*) from chained_rows;

  count(*)

----------

      3294

$ exp allan/allan file=test.dmp tables=test

export: release 9.2.0.3.0 - production on sun jun 6 13:50:08 2004

copyright (c) 1982, 2002, oracle corporation.  all rights reserved.

connected to: oracle9i enterprise edition release 9.2.0.3.0 - production

with the partitioning, olap and oracle data mining options

jserver release 9.2.0.3.0 - production

export done in zhs16gbk character set and al16utf16 nchar character set

about to export specified tables via conventional path ...

. . exporting table                           test     169344 rows exported

export terminated successfully without warnings.

$ sqlplus allan/allan

sql*plus: release 9.2.0.3.0 - production on sun jun 6 13:50:43 2004

copyright (c) 1982, 2002, oracle corporation.  all rights reserved

connected to:

oracle9i enterprise edition release 9.2.0.3.0 - production

本文关键:关于Oracle数据库中行迁移/行链接的问题
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top