日期:2014-05-16  浏览次数:20504 次

【redefined】在线重定义概览与详细使用

在线重定义

In any database system, it is occasionally necessary to modify the logical or physical structure of a table to:

  • Improve the performance of queries or DML
  • Accommodate application changes
  • Manage storage

---在以下情况,常需要使用到在线重定义:

希望提高查询或dml语句的执行效率

适应应用的改变

对表的存储属性进行管理


Oracle Database provides a mechanism to make table structure modifications without significantly affecting the availability of the table. The mechanism is called online table redefinition. Redefining tables online provides a substantial increase in availability compared to traditional methods of redefining tables.

---oracle数据库提供了在线重定义的方法,使得在不影响表的使用的前提下对表的结构进行修改。与传统的修改方法相比,这种方法增加了可用性


When a table is redefined online, it is accessible to both queries and DML during much of the redefinition process. The table is locked in the exclusive mode only during a very small window that is independent of the size of the table and complexity of the redefinition, and that is completely transparent to users.

---对一个表做在线重定义的大部分时间里,你可以继续对表进行查询和DML操作。期间,只有在非常小的一段时间内,需要进行锁表,这一小段时间的长短取决于表的大小和复杂度,但这小段时间对用户来讲是完全透明的


Online table redefinition requires an amount of free space that is approximately equivalent to the space used by the table being redefined. More space may be required if new columns are added.

---在线重定义的一个特点是,需要和原表大小差不多的额外空间来完成这个操作。当然,如果你在新定义的表中添加了一些新列,那么就需要更多的空间


Online table