My FAQ,最新最全的IT技术FAQ
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 未整理篇 | 技术讨论
  当前位置: > 程序开发 > 数据库开发 > Oracle
请教关于rowid的几个问题
作者:未知 时间:2005-09-13 19:02 出处:ChinaUnix.net 责编:My FAQ
              摘要:请教关于rowid的几个问题

听说rowid反映的是数据的实际物理地址
现在我有一个大表需要操作,为提高效率我想用多进程处理,每个进程处理不同的数据,那么
1.rowid的编码规律或规则是什么,好像通常连续,但也有不连续的时候。18位编码中所有的可见字符都可能出现么。我问这个问题的目的是想通过rowid能将数据比较均匀的分布开,以便每个进程的负荷大致相当。另外rowid接近的数据是否通常存储在相同或相近的盘区中,以便我不同进程存取不同的物理IO,实现IO上的分布
2.通过rowid存取数据,比如where rowid between 'AAAAAAAAAAAAAAAAAA' and 'AAAAAAAAAACAAAAAAA'
数据库是否还会全表扫描
3.由于是并发操作,会有insert/update/delete操作,这些操作会影响rowid的值么(尤其是比如我A进程删除了1行,B进程又插入了1行,这两行的rowid有没有可能是同一个啊)

 sshd 回复于:2005-01-06 02:04:55
do not manipulate rowids directly.
for queries, use "parallel" hint to archive parallelism
for DMLs, parallelism can be achived by partition the tables

 luck28us 回复于:2005-01-06 21:41:19
ROWID是和物理位置有关。从student guide中摘一段:
The format(ROWID) is OOOOOOFFFBBBBBBRRR:
. OOOOOO is the object number.
. FFF is the relative data file number where the block is located; the
file number is relative to the tablespace.
. BBBBBB is the block ID where the row is located.
. RRR is the row in the block.

不过如楼上sshd说的一样,不要直接操作ROWID!

 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 myfaq.com.cn All rights reserved. www.myfaq.com.cn 版权所有