Re: cpu time and query column in tkprof output

  • From: "jaromir nemec" <jaromir@xxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 3 Feb 2005 23:39:30 +0100

Hi,



> Whenever I have done comparisons of different sql to produce the same

> result, the bytes sent via SQL*Net were always the same - maybe wrong,

> but at least consistently wrong.



I completely agree. I performed some tests with sample query (that return 
the length of its own statement in bytes)



select (count(*)-1) * length('select * from dual union all ') + 94 from (

select * from dual union all

select * from dual union all

select * from dual union all

select * from dual union all

select * from dual union all

< add some rows here to get different statement lengths>

select * from dual

);



Bytes received seems to have a systematic error (the value is about 1KB 
*less* then the length of SQL statement) , so small values are probably 
meaningless.

Bytes sent seems to be - in this count(*) case - stabile. Note the switch 
from 345 to 346 for higher numbers.





Regards



Jaromir





Some results - Length of SQL Statement compared with bytes received





(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                              239





        345  bytes sent via SQL*Net to client

        503  bytes received via SQL*Net from client



(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                             1254



        345  bytes sent via SQL*Net to client

        503  bytes received via SQL*Net from client





(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                             2414



        345  bytes sent via SQL*Net to client

       1121  bytes received via SQL*Net from client





(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                             4734



        345  bytes sent via SQL*Net to client

       3477  bytes received via SQL*Net from client



(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                             9374





        345  bytes sent via SQL*Net to client

       8190  bytes received via SQL*Net from client





(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                            18654



        346  bytes sent via SQL*Net to client

      17615  bytes received via SQL*Net from client



(COUNT(*)-1)*LENGTH('SELECT*FROMDUALUNIONALL')+94

-------------------------------------------------

                                           130014

        346  bytes sent via SQL*Net to client

     130715  bytes received via SQL*Net from client



----- Original Message ----- 
From: "Wolfgang Breitling" <breitliw@xxxxxxxxxxxxx>
To: "Cary Millsap" <cary.millsap@xxxxxxxxxx>
Cc: <yasbs@xxxxxxxxxxxxxx>; <oracle-l@xxxxxxxxxxxxx>
Sent: Wednesday, February 02, 2005 4:49 PM
Subject: Re: cpu time and query column in tkprof output 


--
//www.freelists.org/webpage/oracle-l

Other related posts: