Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ 10046 trace only open for a particular SQL statement     - Android project using the command to create and install the package (Programming)

- PostgreSQL query lock and kill the process (Database)

- shell script: the number of characters in the text to print no more than 6 words (Programming)

- Redhat 7 modify the default run level method --RHEL7 use systemd to create a symbolic link to the default runlevel (Linux)

- Getting Started Linux Shell Scripting (Programming)

- Analyzing Linux server architecture is 32-bit / 64-bit (Server)

- vector C ++ sequence containers (Programming)

- Create, modify, delete users, user groups under linux (Linux)

- Fedora && Arch Linux - the most romantic thing to happen now (Linux)

- Ubuntu the ARP (arptables) (Linux)

- How to query the role of Linux services (Linux)

- PHP CURL get cookies simulated login (Database)

- CentOS 7.0 local address and configure yum source address priority (Linux)

- Linux NFS service fixed ports and firewall configuration (Linux)

- Ubuntu buffalo wzr-hp-300nh brush DD-WRT router system (Linux)

- awk pattern matching (Programming)

- How to install Zephyr Test Management Tools on CentOS 7.x (Server)

- How to install the client sqlplus under linux (Database)

- Ubuntu How to mount iso file (Linux)

- The array of C language (Programming)

 
         
  10046 trace only open for a particular SQL statement
     
  Add Date : 2018-11-21      
         
         
         
  Recently encountered such an interesting question: Is there a SQL statement, most of the time its execution time is several tens of milliseconds; but occasionally a particular execution time longer than 2 seconds. Because it is very sensitive to the application of the execution time of this statement, we must diagnose it because of what causes the occasional execution time is longer than 2 seconds.

Why is this issue challenging it? Because it is difficult to collect slow when 10046 trace: First, we do not know when this problem occurs, do not know what will happen in the session. If all-day open session 10046 trace, it will have a lot larger trace and affect overall database performance.

Fortunately, this database is 11g and 11g in the event ++ feature allows us only to a particular SQL collect 10046 trace. That in turn run 10046 trace when this SQL in SQL runs out after this Close 10046 trace. Such It can significantly reduce the size of the generated trace. But because we can not determine which session will be a problem, so long as the run-off of the session will have a SQL trace file.

Step is to open (put the following piece of SQL awsh60c8mpfu1 replace the SQL_ID):

alter system set events 'sql_trace [sql: awsh60c8mpfu1] level 12';

And the step is closed (put the following piece of SQL awsh60c8mpfu1 replace the SQL_ID):

alter system set events 'sql_trace [sql: awsh60c8mpfu1] off';

After collecting a lot of 10046 trace, and use tkprof format (specify AGGREGATE = NO, so that each execution would tkprof generate summary report), we finally locate the problem occurs when the SQL statement to read physical block has spent more much time.
     
         
         
         
  More:      
 
- Thunderbird 24.4.2 has been released for use with PPA updates (Linux)
- CentOS 7.0 local address and configure yum source address priority (Linux)
- How to configure security management services under Linux (Linux)
- Incremental garbage collection mechanism for Ruby 2.2 (Programming)
- Linux and Unix systems really do network more secure (Linux)
- The script Linux command (Linux)
- Linux configuration startup mount: fstab file (Linux)
- What is a logical partition management LVM, how to use in Ubuntu (Linux)
- To use Linux to create a secure managed gateway (Linux)
- OpenGL shadow map (Programming)
- Ubuntu 14.04 compile and install Apache (Server)
- Ubuntu uses the / etc / profile file to configure the JAVA environment variable (Linux)
- Hadoop - Task Scheduling System Comparison (Server)
- The specified user to execute commands under Linux (Linux)
- How to forcibly change the Linux system password on a regular basis (Linux)
- Linux RAID Set RAID 10 or 0 + 1 (Linux)
- Java synchronization mechanism: synchronized, wait, notify (Programming)
- Java synchronization mechanism used in locking Thought (Programming)
- Unetbootin make use U disk loading Linux system (Linux)
- Enterprise-class GitHub warehousing environment build (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.