Home » RDBMS Server » Performance Tuning » tkprof fetch count
tkprof fetch count [message #211185] Wed, 27 December 2006 01:34 Go to next message
sourajit_seth
Messages: 38
Registered: November 2005
Location: India
Member
Hi,
Can you explain whyn after executing a "Select" statement from a single table, which return "N" rows it is showing "Count" of "Fetch" as "2N" ?

Thanks
Re: tkprof fetch count [message #211199 is a reply to message #211185] Wed, 27 December 2006 02:47 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Can you please post the relevant section from your TKProf output here?
Re: tkprof fetch count [message #211201 is a reply to message #211185] Wed, 27 December 2006 03:09 Go to previous messageGo to next message
sourajit_seth
Messages: 38
Registered: November 2005
Location: India
Member
Fetch Count is showing 4 for retrieving 2 rows of following table.

SQL> select * from seth ;

A B
----- ------
1 test1
2 test2

Trace file generated from this statement looks like

************************************************************
select *
from seth


call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 2 0.01 0.00 0 8 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 4 0.00 0.00 0 16 0 4
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 8 0.01 0.00 0 24 0 4

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 58

Rows Row Source Operation
------- ---------------------------------------------------
2 TABLE ACCESS FULL SETH (cr=8 pr=0 pw=0 time=97 us)
Re: tkprof fetch count [message #211219 is a reply to message #211201] Wed, 27 December 2006 05:44 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
As shown in the PARSE and EXEC steps, you ran the same SQL twice, thus doubling the stats.

Ross Leishman
Previous Topic: does it cause any negative impact on performance
Next Topic: TPC testing
Goto Forum:
  


Current Time: Tue Dec 06 02:24:35 CST 2016

Total time taken to generate the page: 0.16600 seconds