Home » SQL & PL/SQL » SQL & PL/SQL » execution time
execution time [message #11209] Sun, 14 March 2004 07:32 Go to next message
ramya
Messages: 87
Registered: August 2002
Member
in sqlplus how can we get the execution time of a qury that helps to tune the sql
withregards

ramya
Re: execution time [message #11210 is a reply to message #11209] Sun, 14 March 2004 07:58 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
For quick & dirty results, SET TIMING ON. This causes SQL*Plus to display the elapsed time after each query. It can be affected by network performance though since SQL*Plus only knows the timing for the entire round trip.

You can get a more accurate timing breakdown by

ALTER SESSION SET TIMED_STATISTICS = TRUE;
ALTER SESSION SET SQL_TRACE = TRUE;

then applying tkprof to the tracefile created on the server (note however that access is often restricted.)
Re: execution time [message #11232 is a reply to message #11210] Mon, 15 March 2004 01:58 Go to previous message
Hem Anand
Messages: 68
Registered: March 2004
Member
u can use TKPROF
Previous Topic: Is the Primary Key indexed by system?
Next Topic: problem in choosing top rows using group by function
Goto Forum:
  


Current Time: Thu Apr 18 21:07:07 CDT 2024