|
最初由 zflying2000 发布
[B]查看缓存中那些表是否给cache了可以使用SQL语句查看:
我在9i和10g里面是可以执行查看的。试验好象是这样的, 其他版本就不清楚是不是一样了.
这个query能查到你的表究竟cache到哪个buffer pool里去了:
执行该sql需要对相关表有访问权限!
Select pd.bp_name,bh.object_name, bh.blocks
from x$kcbwds ds, x$kcbwbpd pd,
(select /*+ use_hash(x) */ x.set_ds, o.name object_name, count(*) BLOCKS
from obj$ o, x$bh x
where o.dataobj# = x.obj
and x.state !=0
and o.owner# !=0
group by set_ds,o.name) bh
where ds.set_id >= pd.bp_lo_sid
and ds.set_id <= pd.bp_hi_sid
and pd.bp_size != 0
and ds.addr=bh.set_ds
and bh.object_name = 'your_table_name_here';
select /*+ use_hash(x) */ x.set_ds, o.name object_name, count(*) BLOCKS
from obj$ o, x$bh x
where o.dataobj# = x.obj
and x.state !=0
and o.owner# !=0
group by set_ds,o.name [/B]
這個倒是挺有意思的! |
|