In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The 10046 event of Oracle can track the SQL statements executed by the application and get the number of parses. Information such as the number of execution, CPU usage time and so on. This is very useful for us to analyze and locate database performance problems.
10046 event is one of the most important events when oracle is used for system performance analysis. When this event is activated, real-time information about the trace session is notified to oracle kernel and written to the appropriate trace file.
This useful information mainly includes how sql is parsed, the use of binding variables, wait events that occur in the session, and so on.
10046 event can be divided into different levels (level) to track and record different degrees of useful information. For these different levels, it should be noted that they are backward compatible, that is, trace information at a higher level contains all information below that level.
The tracking levels of 10046event are roughly as follows:
Level 1: tracks sql statements, including parsing, execution, extraction, commit, and rollback.
Level 4: includes details of variables
Level 8: including wait events
Level 12: including binding variables and wait events
Where level 1 is equivalent to opening sql_trace
Before opening the 10046-time SQL Trace, set the following parameters.
Timed_statistics
This parameter determines whether time-related statistics are collected. If this parameter is FALSE, then the result of SQL Trace is of little use. By default, this parameter is set to TRUE.
Max_dump_file_size
The size of the dump file, that is, deciding whether to limit the size of the SQL Trace file, SQL Trace on a busy system may generate a lot of information, so it is best to set this parameter to unlimited at the session level.
Tracefile_identifier
Set the identification string to the Trace file, which is a very useful parameter. Setting an easy-to-read string can find the Trace file faster.
To modify the above parameters in the current session, simply use the following command:
ALTER SESSION SET timed_statistics=true
ALTER SESSION SET max_dump_file_size=unlimited
ALTER SESSION SET tracefile_identifier='my_trace_session'
Lab: setting up the 10046 event
Alter session set events' 10046 trace name context forever, level 12'
Select *
From (select deptno
Ename
Sal
Row_number () over (partition by deptno order by sal desc) rn
From emp)
Where rn
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.