摘自【深入解析Oracle----作者:盖国强】
/* break on hash_value skip 1 :每个页面相同的hash_value只输出第一个,其它的跳过,在sqlplus有效,ps/sql developer 中貌似无效 */
break on hash_value skip 1
select /*+ rule */ hash_value, sql_text
from v$sqltext
where (hash_value, address) in (
select a.hash_value, a.address
from v$sqltext a,
(select distinct a.owner, a.segment_name, a.segment_type
from dba_extents a,
(select dbarfil, dbablk
from (select dbarfil, dbablk
from x$bh
order by tch desc)
where rownum < 11) b
where a.relative_fno = b.dbarfil
and a.block_id <= b.dbablk
and a.block_id + a.blocks > b.dbablk) b
where upper(a.sql_text) like '%'||b.segment_name||'%'
and b.segment_type = 'TABLE')
order by hash_value, address, piece;
本文详细探讨了如何通过深入理解Oracle SQL查询、数据访问路径优化以及利用数据库特性来提高应用性能。通过分析Oracle SQL文本、数据库块位置、表访问方式,以及运用SQL查询优化规则,实现高效的数据读取和存储操作。
1146

被折叠的 条评论
为什么被折叠?



