如何诊断过去某个时间段的等待事件原因?

WBOY
リリース: 2016-06-07 15:54:32
オリジナル
1552 人が閲覧しました

如何诊断过去某个时间段的等待事件原因? 1.查看某个等待事件的阻塞会话 select event,blocking_session,sql_id,count(*) from dba_hist_active_sess_history ash where sample_time=to_timestamp('2013-06-24 12:25:00','yyyy-mm-dd hh24:mi:ss') and sampl



如何诊断过去某个时间段的等待事件原因?

1.查看某个等待事件的阻塞会话
select event,blocking_session,sql_id,count(*) from dba_hist_active_sess_history ash
where sample_time>=to_timestamp('2013-06-24 12:25:00','yyyy-mm-dd hh24:mi:ss')
and sample_time and event='cursor: pin S wait on X'
group by event,blocking_session,sql_id
/


查看等待事件的sql语句
SQL> select sql_text from v$sql where sql_id='8duehra3kdx62';


2.查看导致上面的session 等待的 blocking session
SQL> select event,blocking_session,sql_id,count(*) from dba_hist_active_sess_history ash
where sample_time>=to_timestamp('2013-06-24 12:25:00','yyyy-mm-dd hh24:mi:ss')
and sample_time and ash.session_id=2
group by event,blocking_session,sql_id

/

ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!