偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

數(shù)據(jù)庫(kù) MySQL
分享兩個(gè)SQL,這兩個(gè)SQL只是基礎(chǔ)原型,大家自己自定義條件去做一些調(diào)整。主要是在前面講過(guò)的dba_hist_active_sess_history相關(guān)sql上總結(jié)出來(lái)的比較實(shí)用的sql。

分享兩個(gè)SQL,這兩個(gè)SQL只是基礎(chǔ)原型,大家自己自定義條件去做一些調(diào)整。主要是在前面講過(guò)的dba_hist_active_sess_history相關(guān)sql上總結(jié)出來(lái)的比較實(shí)用的sql。

DBA_HIST_ACTIVE_SESS_HISTORY

DBA_HIST_ACTIVE_SESS_HISTORY displays the history of the contents of the in-memory active session history of recent system activity. This view contains snapshots of V$ACTIVE_SESSION_HISTORY. See "V$ACTIVE_SESSION_HISTORY" for further interpretation details for many of these columns (except SNAP_ID, DBID, and INSTANCE_NUMBER).

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

查看故障時(shí)間段等待事件、問(wèn)題sql id及會(huì)話訪問(wèn)次數(shù)

  1. --alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss'
  2. select trunc(sample_time, 'mi') tm, sql_id, nvl(event,'CPU'),count(distinct session_id) cnt 
  3.  from dba_hist_active_sess_history 
  4.  where sample_time between to_date('2019-08-22 14:00:00') and 
  5.  to_date('2019-08-22 14:30:00') 
  6.  group by trunc(sample_time, 'mi'), sql_id,nvl(event,'CPU') 
  7.  order by cnt desc; 

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

查看該sql相關(guān)的等待事件及對(duì)應(yīng)的會(huì)話訪問(wèn)次數(shù)

  1. select sql_id, nvl(event, 'CPU'), count(distinct session_id) sz 
  2.  from dba_hist_active_sess_history a, dba_hist_snapshot b 
  3.  where sample_time between to_date('2019-08-22 14:00:00') and 
  4.  to_date('2019-08-22 15:00:00') 
  5.  and sql_id = '4ksvn2rgjnhcm' 
  6.  and a.snap_id = b.snap_id 
  7.  and a.instance_number = b.instance_number 
  8.  group by sql_id, nvl(event, 'CPU') 
  9.  order by sz desc; 

分享兩個(gè)實(shí)用SQL--查看故障時(shí)間等待事件、問(wèn)題sql及會(huì)話訪問(wèn)次數(shù)

 

責(zé)任編輯:趙寧寧 來(lái)源: 今日頭條
相關(guān)推薦

2019-09-05 08:25:15

Oraclesidsql

2017-10-16 10:59:15

系統(tǒng)存儲(chǔ)SQL Serve

2019-10-31 08:22:39

shell腳本Linux

2010-04-15 13:09:41

無(wú)線網(wǎng)卡故障問(wèn)題

2019-08-26 10:15:29

腳本索引數(shù)據(jù)庫(kù)

2020-08-31 11:40:54

VimLinux字符

2010-05-27 09:50:18

MySQL導(dǎo)入sql腳

2010-07-21 11:32:35

SQL Server日

2020-12-24 09:18:51

SQL數(shù)據(jù)庫(kù)函數(shù)

2011-09-20 15:19:15

Python

2022-05-31 09:01:13

GitHub工具安全

2024-11-11 14:23:11

2010-09-09 13:43:48

SQL函數(shù)NEWID

2010-12-16 09:05:50

SQL Server

2021-11-29 10:40:41

Linux運(yùn)維命令

2010-12-07 16:17:40

SQL Server

2010-09-09 15:23:16

SQL更新數(shù)據(jù)

2021-01-08 16:27:52

SQL數(shù)據(jù)庫(kù)開(kāi)發(fā)

2010-07-06 12:34:28

SQL Server數(shù)

2010-09-06 10:52:27

sql server語(yǔ)句
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)