DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: how can I find out how long a query runs

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Posts
    11

    Question how can I find out how long a query runs

    how can I find out how long a query runs with no tkprof or traces. just from v$ tables.
    oracle db 9.2.0.3

    Thanks...


  2. #2
    Join Date
    Apr 2003
    Location
    South Carolina
    Posts
    148
    select to_char(sysdate,'dd-mon-yy hh24:mi:ss') from dual;
    sqlstatement;
    select to_char(sysdate,'dd-mon-yy hh24:mi:ss') from dual;

    look at difference or ...

    dbms_utility.get_time();

    HTH
    Gregg

  3. #3
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    No need to look at v$table.

    set time on
    set timing on
    Set autot trace statis
    and run your sql statement.

    You will see the elpased time.

    Tamil

  4. #4
    Join Date
    Jan 2003
    Location
    india
    Posts
    175
    "set timing on" will work only in sqlplus.

    you can look in v$session_longops view.

  5. #5
    Join Date
    Feb 2004
    Posts
    11
    Thank,
    its been very helpfull.

  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    124
    "set timing on" will work only in sqlplus.

    you can look in v$session_longops view.
    If the trnsaction is over you won't get any information from v$session_longops view. The above is true if you can do baby sitting by watching the running transaction. BTW If you can do the baby sitting then you even don't need v$ view, put the clock in front of you.

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