Chinaunix

标题: 请教关于rowid的几个问题 [打印本页]

作者: toworm    时间: 2005-01-05 23:46
标题: 请教关于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
标题: 请教关于rowid的几个问题
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
标题: 请教关于rowid的几个问题
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!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2