Re: Query response time [message #372904] |
Fri, 16 March 2001 14:20 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
in sqlplus "set timing on"
for a statement in a pl/sql block:
-- for sqlpus you need this command
set serverouput on
DECLARE
timing PLS_INTEGER;!
x PLS_INTEGER;
BEGIN
timing := DBMS_UTILITY.get_time;
FOR i IN 1 .. 100000
LOOP
x := i;
END LOOP;
DBMS_OUTPUT.put_line ('hundredths of a sec = ' || TO_CHAR (DBMS_UTILITY.get_time - timing) );
END;
You can also "alter session set sql_trace true;"
do statement...
alter session set sql_trace false;
Find the trace file in user_dump_dest and send the .trc file through tkprof. You need TIMED_STATISTICS=true in the initialization parms.
|
|
|
|