SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 Y 78760 5131 Y 78760 5173 Y 78760 5160 Y 78760 5168 Y 78760 5163 Y 78760 5129 N 78760 5171 Y 78760 5166 Y 78760 5174 Y 78760 5161 Y 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5169 Y 78760 5164 Y 78760 5130 N 78760 5172 Y 78760 5167 Y 78760 5175 Y 78760 5162 Y 78760 5128 Y 78760 5170 Y 78760
20rows selected.
SQL>select dbms_rowid.ROWID_RELATIVE_FNO(rowid),dbms_rowid.ROWID_BLOCK_NUMBER(rowid) from lp;
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 N 78760 5173 N 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 N 78760 5171 N 78760 5166 N 78760 5174 N 78760 5161 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5167 N 78760 5175 N 78760 5162 N 78760 5128 N 78760 5170 N 78760
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 Y 78760 5173 N 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 Y 78760 5171 N 78760 5192 Y 78760 5166 N 78760 5174 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5161 N 78760 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5167 N 78760 5175 N 78760 5162 N 78760 5128 Y 78760 5170 N 78760
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 Y 78760 5173 N 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 Y 78760 5171 N 78760 5192 N 78760 5166 N 78760 5174 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5161 N 78760 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5193 Y 78760 5167 N 78760 5175 N 78760 5162 N 78760 5128 N 78760 5170 N 78760
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 Y 78760 5173 N 78760 5194 Y 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 Y 78760 5171 N 78760 5192 N 78760 5166 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5174 N 78760 5161 N 78760 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5193 N 78760 5167 N 78760 5175 N 78760 5162 N 78760 5128 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5170 N 78760
依然如故,不知道大家有没有发现,每次我执行完插入,都会执行一条select dbms_rowid.ROWID_RELATIVE_FNO(rowid),dbms_rowid.ROWID_BLOCK_NUMBER(rowid) from lp; 这其实是全表扫描,本来块没在buffer里,一个FTS把块全给整进来了(小表buffer读,大表在11g中通常情况是直接路径读),知道原因了,再试一遍
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 Y 78760 5173 N 78760 5194 N 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 Y 78760 5171 N 78760 5192 N 78760 5166 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5174 N 78760 5161 N 78760 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5193 N 78760 5167 N 78760 5175 N 78760 5162 N 78760 5128 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5170 N 78760
23rows selected.
SQL>select dbms_rowid.ROWID_RELATIVE_FNO(rowid),dbms_rowid.ROWID_BLOCK_NUMBER(rowid) from lp;
SQL>select file#,BLOCK#,DIRTY,OBJD from v$bh where objd='78760';
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5165 N 78760 5131 Y 78760 5173 N 78760 5194 N 78760 5160 N 78760 5168 N 78760 5163 N 78760 5129 Y 78760 5171 N 78760 5192 N 78760 5166 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5174 N 78760 5195 Y 78760 5161 N 78760 5169 N 78760 5164 N 78760 5130 N 78760 5172 N 78760 5193 N 78760 5167 N 78760 5175 N 78760 5162 N 78760
FILE# BLOCK# D OBJD ---------- ---------- - ---------- 5128 N 78760 5170 N 78760