ITPub博客

首页 > 应用开发 > IT综合 > rowID explaination

rowID explaination

原创 IT综合 作者:imars 时间:2009-08-31 11:50:26 0 删除 编辑

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博客 ” ,链接:https://blog.itpub.net/256370/viewspace-1026499/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle Hint
下一篇: Segment Advisor脚本
请登录后发表评论 登录
全部评论

注册时间:2011-11-15

  • 博文量
    18
  • 访问量
    159491