calculate total running time of a SQL statement??
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: calculate total running time of a SQL statement??

  1. #1
    Join Date
    Jan 2003
    Posts
    9

    calculate total running time of a SQL statement??

    Hi...

    In my database, I find the "cpu time" of running a sql statment is always zero. In fact, I waits for a while to get the results.

    Does the cpu time isn't include the io time?

    And, how can I calculate the total excution time of a SQL command??

    thanks...

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Where are you getting the cpu time from?

    For a small query the cpu time could be 0.00 seconds due to rounding. Usually it is physical i/o time that you wait for.

    Search on "trace" and "tkprof" for more.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    OOOPS! I forgot - you will need "timed_statistics=true". It can go in init.ora or be set with ALTER SESSION or ALTER SYSTEM.
    (I put it in init.ora 4 years ago and haven't thought about it since!)
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width