Elapsed Time in Tkprof Misleads
650952Jul 19 2008 — edited Jul 28 2008Hi,
Our application team complains about job which was running in 1/2 hr before is now taking 4 hrs. I created a logon trigger to trace 10046 event on application user which runs the job, looking into the tkprof output of the trace with options sys=no and waits=yes shows the session executed several sql statements with elapsed times are less than 2min none of the sql statement is executed more than 2 min but looking into wait events they have very large values of times waited, my question is why elapsed time is not including that time especially for the wait event SQL*Net message from client and how to reduce that time? Even this happens when I try to execute the sql from database server side not only from application server also runs very long time.
select IID, TYPEIID, JOBID, VERSNO, MODFLAG, STARTDATE, ENDDATE
from
IMM_NAMESERVICE
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1327137 4.65 119.31 95027 1374787 0 2654271
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 1327139 4.65 119.32 95027 1374787 0 2654271
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 61
Rows Row Source Operation
------- ---------------------------------------------------
2654271 TABLE ACCESS FULL IMM_NAMESERVICE (cr=1374787 pr=95027 pw=0 time=50465590 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1327137 0.00 1.33
db file sequential read 1 0.01 0.01
db file scattered read 5961 0.37 51.80
SQL*Net message from client 1327137 0.10 2641.36
********************************************************************************