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

Home -> Community -> Usenet -> c.d.o.server -> Re: Time a sql statement

Re: Time a sql statement

From: Adrian Carlson-Hedges <adrian.ch_at_btinternet.com>
Date: Thu, 28 Feb 2002 18:26:00 +0000 (UTC)
Message-ID: <a5lsno$7cm$1@helle.btinternet.com>


"Ganesh Raja" <ganesh_at_gtfs-gulf.com> wrote in message news:d7hr7u8b3l8asuu52rbevcab8k3o3lmn73_at_4ax.com...
> On 27 Feb 2002 18:29:04 -0800, allanwtham_at_yahoo.com (godmann) wrote:
>
> >Hi there,
> >
> > In sqlplus, how do you go about to time a sql statement? I want
> >to know how many msec it takes for a particular *doubtful* statement.
> >
> >Allan W. Tham
> >Oracle DBA
>
> Use Set Timing On
>
> This will give u the Elapsed Time in MS for each stmt executed.
>
> HTH
>
> [Additions and Corrections Always Welcome.]
> Best Regards,
> Ganesh R

This will give you the time for the round trip, not just the execution of the sql statement.
i.e.

set timing on

>scott on localdb -> Select * from big_table;

...
...
...

Elasped Time 00:00:01.243
>scott on localdb ->

>scott on localdb ->connect scott/tiger_at_superfast_database_at
_the_end_of_a_slow_connection
Connected
>scott on superfast -> Select * from big_table;

...
...
...

Elapsed Time 00:00:14.353
>scott on superfast ->

I suspect that this is not important, but It's still worth pointing out

Adrian Received on Thu Feb 28 2002 - 12:26:00 CST

Original text of this message

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