Home » RDBMS Server » Performance Tuning » TKPROF Fetch stats (10g)
TKPROF Fetch stats [message #347865] Sun, 14 September 2008 13:26 Go to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,
I tried this:



SQL> alter session set sql_trace=true;

Session altered.

SQL> select 'x' a from dual;

A
-
x

SQL> alter session set sql_trace=false;

Session altered.

SQL> host tkprof ora10g_ora_6104.trc ora_6104.prf sys=no

TKPROF: Release 10.2.0.3.0 - Production on Sun Sep 14 14:18:24 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.




Why is it on the tkprof output, the Fetch count is 2, even though the query only returned one row.

Here's the output of tkprof


select 'x' a 
from
 dual


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.03          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        2      0.00       0.00          0          0          0           1
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        4      0.00       0.03          0          0          0           1





Thank you very much!
Re: TKPROF Fetch stats [message #347867 is a reply to message #347865] Sun, 14 September 2008 13:32 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read the raw trace and you will know.

To help you: Metalink note 39817.1 "Interpreting Raw SQL_TRACE and DBMS_SUPPORT.START_TRACE output".

Regards
Michel
Re: TKPROF Fetch stats [message #347872 is a reply to message #347867] Sun, 14 September 2008 14:05 Go to previous message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Thank you very much, I'll check on the raw. As for the metalink I think I cannot access that. We dont have access for it =)


This is what the raw contains


*** 2008-09-14 14:17:27.204
*** ACTION NAME:() 2008-09-14 14:17:27.198
*** MODULE NAME:(SQL*Plus) 2008-09-14 14:17:27.192
*** SERVICE NAME:(ora10g) 2008-09-14 14:17:27.192
*** SESSION ID:(142.214) 2008-09-14 14:17:27.192
=====================
PARSING IN CURSOR #1 len=22 dep=0 uid=61 oct=3 lid=61 tim=19381078997 hv=1629880439 ad='309f72c4'
select 'x' a from dual
END OF STMT
PARSE #1:c=0,e=37335,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=4,tim=19381078986
EXEC #1:c=0,e=55,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=19381092630
FETCH #1:c=0,e=25,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=4,tim=19381092976
FETCH #1:c=0,e=5,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=19381112466
STAT #1 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=8 us)'
=====================
PARSING IN CURSOR #2 len=33 dep=0 uid=61 oct=42 lid=61 tim=19386683171 hv=525901419 ad='0'
alter session set sql_trace=false
END OF STMT
PARSE #2:c=0,e=229,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=19386683166
EXEC #2:c=0,e=22,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=19386684257



I can see the 2 fetch, but why did it do that? I'll check on tom's book. Thanks.



*didn't get that much info on the book only descriptions of the properties per *record* in the trace file.

[Updated on: Sun, 14 September 2008 14:38]

Report message to a moderator

Previous Topic: NumNull Stats
Next Topic: temporary tablespace growing
Goto Forum:
  


Current Time: Fri Dec 02 16:14:43 CST 2016

Total time taken to generate the page: 0.22306 seconds