最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

enq:SQ-contention

来源:动视网 责编:小采 时间:2020-11-09 15:00:51
文档

enq:SQ-contention

enq:SQ-contention:--每分钟执行情况 SQL select sql_id, mi, count(mi) 2 from (select event, sql_id, to_char(sample_time, yyyymmdd hh24mi) mi --, 3 --session_id 4 from dba_hist_active_sess_history 5 where
推荐度:
导读enq:SQ-contention:--每分钟执行情况 SQL select sql_id, mi, count(mi) 2 from (select event, sql_id, to_char(sample_time, yyyymmdd hh24mi) mi --, 3 --session_id 4 from dba_hist_active_sess_history 5 where


--每分钟执行情况 SQL select sql_id, mi, count(mi) 2 from (select event, sql_id, to_char(sample_time, yyyymmdd hh24mi) mi --, 3 --session_id 4 from dba_hist_active_sess_history 5 where sql_id = 7wxfw53bsmgpq 6 and sample_time to_date(201407

--每分钟执行情况
SQL> select sql_id, mi, count(mi)
2 from (select event, sql_id, to_char(sample_time, 'yyyymmdd hh24mi') mi --,
3 --session_id
4 from dba_hist_active_sess_history
5 where sql_id = '7wxfw53bsmgpq'
6 and sample_time > to_date('20140717 0940', 'yyyymmdd hh24mi')
7 and sample_time < to_date('20140717 0950', 'yyyymmdd hh24mi'))
8 group by sql_id, mi
9 order by mi ;

SQL_ID MI COUNT(MI)
------------- ------------- ----------
7wxfw53bsmgpq 20140717 0942 1
7wxfw53bsmgpq 20140717 0943 23
7wxfw53bsmgpq 20140717 0944 125
7wxfw53bsmgpq 20140717 0946 96
7wxfw53bsmgpq 20140717 0947 114
7wxfw53bsmgpq 20140717 0949 44

通过图片,发现对 第一条获取序列的语句比较暂用性能

--等待事件以及语句情况
SQL> select event,sql_id, mi, count(mi)
2 from (select substrb(event,1.30) event, sql_id, to_char(sample_time, 'yyyymmdd hh24mi') mi --,
3 --session_id
4 from dba_hist_active_sess_history
5 where sql_id = '7wxfw53bsmgpq'

6 and sample_time > to_date('20140717 0940', 'yyyymmdd hh24mi')
7 and sample_time < to_date('20140717 0950', 'yyyymmdd hh24mi'))
8 group by event,sql_id, mi
9 order by mi ;

EVENT SQL_ID MI COUNT(MI)
---------------------------------------------------------------- ------------- ------------- ----------
7wxfw53bsmgpq 20140717 0942 1
buffer busy waits 7wxfw53bsmgpq 20140717 0943 1
enq: SQ - contention 7wxfw53bsmgpq 20140717 0943 22
buffer busy waits 7wxfw53bsmgpq 20140717 0944 3

enq: SQ - contention 7wxfw53bsmgpq 20140717 0944 122
buffer busy waits 7wxfw53bsmgpq 20140717 0946 2
enq: SQ - contention 7wxfw53bsmgpq 20140717 0946 94
buffer busy waits 7wxfw53bsmgpq 20140717 0947 2
enq: SQ - contention 7wxfw53bsmgpq 20140717 0947 112
buffer busy waits 7wxfw53bsmgpq 20140717 0949 1
enq: SQ - contention 7wxfw53bsmgpq 20140717 0949 43

--大小获取查询
SQL> select sequence_name,cache_size from dba_sequences where sequence_name like upper('%qreque%');

SEQUENCE_NAME CACHE_SIZE
------------------------------ ----------
QREQUESTNO 20 改成100 在测试

SQL>

--大小获取查询
SQL> select sequence_name,cache_size from dba_sequences where sequence_name like upper('%qreque%');

SEQUENCE_NAME CACHE_SIZE
------------------------------ ----------
QREQUESTNO 20 改成100 在测试

文档

enq:SQ-contention

enq:SQ-contention:--每分钟执行情况 SQL select sql_id, mi, count(mi) 2 from (select event, sql_id, to_char(sample_time, yyyymmdd hh24mi) mi --, 3 --session_id 4 from dba_hist_active_sess_history 5 where
推荐度:
标签: sql sq 每分钟
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top