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

推荐订阅源

Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
I
InfoQ
B
Blog
WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
C
Check Point Blog
月光博客
月光博客
L
LangChain Blog
GbyAI
GbyAI

博客园 - 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.