1. tkprof is an executable tool for analyzing Oracle tracking files and generating more user-friendly and clear output results. C:/Oracle/ora92/bin/tkprof.exe
2. Full name of tkprof
References
Http://www.itpub.net/showthread.php? S = cbfea4845ef5b2a3f4adb00de0de9317 & threadid = 577624 & Highlight = tkprof
3. Basic Steps
1) SQL> alter system set timed_statistics = true;
2) user-level self-tracking:
SQL> alter session set SQL _trace = true;
SQL> alter session set SQL _trace = false;
User-level DBA tracking: (for example, sys tracking test, You need to log on with sysdba)
. A). SQL> select S. username, S. Sid, S. Serial #, S. Command from V $ session s
Where S. Username = 'colm ';
B). SQL> exec SYS. dbms_system.set_ SQL _trace_in_session (9, 7, true );
C). SQL> exec SYS. dbms_system.set_ SQL _trace_in_session (9, 7, false );
PS: 9 is Sid, 7 is serial #
3) C:> Cd C:/Oracle/admin/Colm/udump
4) C:/Oracle/admin/Colm/udump> tkprof colm_ora_2056.trc trace.txt print = 100 record1_ SQL .txt sys = No
5) trace.txt File
Example:
**************************************** ***************************************
Select *
From
Col_case
Call count CPU elapsed disk query current rows
-----------------------------------------------------------------------
Parse 1 0.00 0.00 0 0 0 0
Execute 0 0.00 0.00 0 0 0 0
Fetch 0 0.00 0.00 0 0 0 0
-----------------------------------------------------------------------
Total 1 0.00 0.00 0 0 0 0
Misses in library Cache during parse: 1
Optimizer goal: Choose
Parsing user ID: 62
The statements to be adjusted meet the following requirements:
(1). Excessive CPU usage
(2). parse, execute, fetch takes too much time
(3) Too many disk reads, and too few data blocks are read in query/current (SGA ).
(4). Access Multiple blocks and return only 2 rows