Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP! Execution time of Select stmt

Re: HELP! Execution time of Select stmt

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 11 Oct 2001 19:16:23 +0200
Message-ID: <tsbld4jabsi39a@news.demon.nl>

"Robert Chin" <chinman_at_optonline.net> wrote in message news:U2ax7.197171$w7.32201320_at_news02.optonline.net...
> Put the following code in a file, and run it in sql*plus
> you should see 2 numbers on output.
> The difference of which is the elapsed time to the 1/100 of a second.
> --------------------------------------------------------------------------

--

> -------
> exec dbms_output.put_line(DBMS_UTILITY.GET_TIME);
> set termout off
> PUT YOUR SELECT QUERY HERE
> (eg, Select * from my_table ;)
> set termout on
> exec dbms_output.put_line(DBMS_UTILITY.GET_TIME);
>
> "Ho" <kowho_at_singnet.com.sg> wrote in message
> news:9q2ftd$b3e$1_at_coco.singnet.com.sg...
> >
> > How to determine the execution time of a SELECT statement in order to
> > fine tune the SELECT stmt ?
> >
> > Many thanks for your help in advance.
> >
> >
>
>
Are you sure this measures the *execution* time, instead of the transport time? You need to run the session with sql_trace = true and timed_statistics is true, and that is the *only* way (in combination with tkprof) to get the *execution* time. Regards, Sybrand Bakker Senior Oracle DBA
Received on Thu Oct 11 2001 - 12:16:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US