rowID explaination

An extended rowid has a four-piece format, OOOOOOFFFBBBBBBRRR:

  • OOOOOO: The data object number that identifies the database segment (AAAAao in the example). Schema objects in the same segment, such as a cluster of tables, have the same data object number.

  • FFF: The tablespace-relative datafile number of the datafile that contains the row (file AAT in the example).

  • BBBBBB: The data block that contains the row (block AAABrX in the example). Block numbers are relative to their datafile, not tablespace. Therefore, two rows with identical block numbers could reside in two different datafiles of the same tablespace.

  • RRR: The row in the block.

  • SELECT ROWID,
    SUBSTR(ROWID,1,6) "OBJECT",
    SUBSTR(ROWID,7,3) "FIL",
    SUBSTR(ROWID,10,6) "BLOCK",
    SUBSTR(ROWID,16,3) "ROW"
    FROM products;

    ROWID OBJECT FIL BLOCK ROW
    ------------------ ------ --- ------ ----
    AAAA8mAALAAAAQkAAA AAAA8m AAL AAAAQk AAA
    AAAA8mAALAAAAQkAAF AAAA8m AAL AAAAQk AAF
    AAAA8mAALAAAAQkAAI AAAA8m AAL AAAAQk AAI

[@more@]r

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

转载于:http://blog.itpub.net/256370/viewspace-1026499/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值