博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
enq: SQ - contention
阅读量:5060 次
发布时间:2019-06-12

本文共 2193 字,大约阅读时间需要 7 分钟。

--每分钟操作

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  在测试

 

版权声明:本文博客原创文章。博客,未经同意,不得转载。

转载于:https://www.cnblogs.com/zfyouxi/p/4640703.html

你可能感兴趣的文章
2016年云堆栈的市场增长状况
查看>>
html超文本标记语言的由来
查看>>
PAT 1095 Cars on Campus
查看>>
cesium编程入门(七)3D Tiles,模型旋转
查看>>
hive数据类型
查看>>
设计模式笔记——Strategy
查看>>
手动从Spring中获取指定对象
查看>>
中缀表达式转后缀表达式,以及计算结果.
查看>>
Oracle的安装与卸载
查看>>
(转载)CentOS: 开放80、22、3306端口操作
查看>>
[HDU] 1074 Doing Homework (NP性质的DP,远没有过去的自己写得好了)
查看>>
ActiveMQ
查看>>
java 数组排序并去重
查看>>
JAVA_OA管理系统(四)番外篇:使用Spring注解注入属性
查看>>
task1-9
查看>>
【收藏】Web App 被看衰,Hybrid App 才是新王道
查看>>
九度oj 题目1064:反序数
查看>>
DS博客大作业--树
查看>>
ElasticSearch 6.0 源码编译
查看>>
uva10870 矩阵
查看>>