惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
C
Check Point Blog
B
Blog RSS Feed
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
GbyAI
GbyAI
The Cloudflare Blog
博客园 - 叶小钗
S
SegmentFault 最新的问题
博客园 - Franky
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
B
Blog
Jina AI
Jina AI

博客园 - Oracle

JS key大全 JS事件 ORACLE中搜索任意字符串 Oracle's Query Transformer Oracle的几个优化模式 Linux中sar命令 Oracle 复制 oracle 中grouping函数的应用 DUMP块的分析 enqueue_stats.sql enqueue_locks.sql latch_spin.sql latch_get.sql latch_types.sql trace_waits.sql session_waits.sql resource_waits.sql routine_waits.sql hidden_parameters.sql all_parameters.sql
latch_sleeps.sql
Oracle · 2009-03-11 · via 博客园 - Oracle

If there are latch free waits, then this script can be used to further diagnose the problem. For each latch type, it reports the estimated impact of sleeps, and the number of sleeps per get. It also reports the number of other waits while holding each latch type, together with the latch level.

To reduce latch free waits, one should concentrate on the latches with the greatest impact. However, if there are a significant number of other waits while holding those latches, then one should regard those sleeps as a secondary symptom of another problem, such as contentiocolumn name        format a37 heading "LATCH TYPE" trunc
column impact      format 9999999999 heading "IMPACT"
column sleep_rate  format a10 heading "SLEEP RATE"
column holding     format 99999999999 heading "WAITS HOLDING"
column level#      format 9999 heading "LEVEL"

select
  l.name,
  l.sleeps * l.sleeps / (l.misses - l.spin_gets)  impact,
  to_char(100 * l.sleeps / l.gets, '99990.00') || '%'  sleep_rate,
  l.waits_holding_latch  holding,
  l.level#
from
  sys.v_$latch  l
where
  l.sleeps > 0
order by
  2 desc
n for a higher level latch.