Oracle ORA_ROWSCN 伪列 说明

 

一. 官网对该伪列的说明

From:11gR2

http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/pseudocolumns007.htm#SQLRF50953

 

       Foreach row, ORA_ROWSCN returns the conservative upper bound system change number(SCN) of the most recent change to the row in the current session. Thispseudocolumn is useful for determining approximately when a row was lastupdated.

       Itis not absolutely precise, because Oracle tracks SCNs by transaction committedfor the block in which the row resides. You can obtain a more fine-grainedapproximation of the SCN by creating your tables with row-level dependencytracking. Refer to CREATE TABLE ... NOROWDEPENDENCIES| ROWDEPENDENCIES for more information on row-level dependency tracking.

 

       ROWDEPENDENCIESSpecify ROWDEPENDENCIES if you want to enable row-level dependency tracking.This setting is useful primarily to allow for parallel propagation inreplication environments. It increases the size of each row by 6 bytes.

       NOROWDEPENDENCIESSpecify NOROWDEPENDENCIES if you do not want table to use the row-leveldependency tracking feature. This is the default.

 

       也就是说,使用表的默认创建参数,即norowdependencies时,此时的ora_rawscn 取自data block header的SCN,那么这时候,对于同一个block里的row而言,他们的ora_rowscn 是一样的。

       而在创建table时指定为rowdependencies时,那么会为每行row 保存一个ora_rowscn. 这样对于同一个block里的row,会有多个ora_rowscn 值。通过dump block,可以发现每个row 会多出一个dscn的信息,该信息就是用来保存ora_rowscn的。  

 

如:

tab 0, row 1, @0×1f88
tl: 12 fb:

Link URL: http://blog.csdn.net/tianlesoftware/article/details/6658529

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7589639/viewspace-705941/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7589639/viewspace-705941/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值