Enq: SQ-contention

Source: Internet
Author: User
-- Execution per minute SQLselectsql_id, mi, count (mi) 2 from (selectevent, SQL _id, to_char (sample_time, yyyymmddhh24mi) mi --, 3 -- average (201407

-- Execution per minute 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

-- Execution per minute
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 ('2014, 20140717 111100', 'yyyymmdd hh24mi ')
7 and sample_time <to_date ('2014, 20140717 111100', '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

Through the image, it is found that the statement for getting the first sequence is of temporary performance.

-- Wait for events and statements
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 ('2014, 20140717 111100', 'yyyymmdd hh24mi ')
7 and sample_time <to_date ('2014, 20140717 111100', '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: sql-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: sql-contention 7wxfw53bsmgpq 20140717 0947 112
Buffer busy waits 7wxfw53bsmgpq 20140717 0949 1
Enq: SQ-contention 7wxfw53bsmgpq 20140717 0949 43

-- Query by size acquisition
SQL> select sequence_name, cache_size from dba_sequences where sequence_name like upper ('% qreque % ');

SEQUENCE_NAME CACHE_SIZE
----------------------------------------
Change QREQUESTNO 20 to 100 during testing

SQL>

-- Query by size acquisition
SQL> select sequence_name, cache_size from dba_sequences where sequence_name like upper ('% qreque % ');

SEQUENCE_NAME CACHE_SIZE
----------------------------------------
Change QREQUESTNO 20 to 100 during testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.