Re: Query Execution Time "alone"
From: onedbguru <onedbguru_at_yahoo.com>
Date: Wed, 16 Mar 2011 17:56:36 -0700 (PDT)
Message-ID: <9444aa6b-cfff-4eea-973a-613e60f41909_at_w36g2000vbi.googlegroups.com>
On Mar 16, 6:28 am, Donatello Settembrino <donatello.settembr..._at_gmail.com> wrote:
> On Mar 15, 8:48 pm, raja <dextersu..._at_gmail.com> wrote:
>
> > so, set autotrace traceonly statistics, will execute the query and
> > just gives the elapsed time of the query and not the data ???
>
> as Jonathan says,
> get the elapsed time and the statistics captured during the execution
> of the query
>
> Here's an example of
>
> SQL> create table t as
> 2 select rownum as c from dual connect by level <= 10000;
>
> Tabella creata.
>
> SQL> select count(*) from t;
>
> COUNT(*)
> ----------
> 10000
>
> SQL> set timing on;
> SQL> set arraysize 1000
> SQL> set autotrace traceonly statistics
> SQL> select * from t;
>
> Selezionate 10000 righe.
>
> Passati: 00:00:00.28
>
> Statistiche
> ----------------------------------------------------------
> 8 recursive calls
> 0 db block gets
> 36 consistent gets
> 0 physical reads
> 0 redo size
> 90442 bytes sent via SQL*Net to client
> 323 bytes received via SQL*Net from client
> 11 SQL*Net roundtrips to/from client
> 0 sorts (memory)
> 0 sorts (disk)
> 10000 rows processed
Date: Wed, 16 Mar 2011 17:56:36 -0700 (PDT)
Message-ID: <9444aa6b-cfff-4eea-973a-613e60f41909_at_w36g2000vbi.googlegroups.com>
On Mar 16, 6:28 am, Donatello Settembrino <donatello.settembr..._at_gmail.com> wrote:
> On Mar 15, 8:48 pm, raja <dextersu..._at_gmail.com> wrote:
>
> > so, set autotrace traceonly statistics, will execute the query and
> > just gives the elapsed time of the query and not the data ???
>
> as Jonathan says,
> get the elapsed time and the statistics captured during the execution
> of the query
>
> Here's an example of
>
> SQL> create table t as
> 2 select rownum as c from dual connect by level <= 10000;
>
> Tabella creata.
>
> SQL> select count(*) from t;
>
> COUNT(*)
> ----------
> 10000
>
> SQL> set timing on;
> SQL> set arraysize 1000
> SQL> set autotrace traceonly statistics
> SQL> select * from t;
>
> Selezionate 10000 righe.
>
> Passati: 00:00:00.28
>
> Statistiche
> ----------------------------------------------------------
> 8 recursive calls
> 0 db block gets
> 36 consistent gets
> 0 physical reads
> 0 redo size
> 90442 bytes sent via SQL*Net to client
> 323 bytes received via SQL*Net from client
> 11 SQL*Net roundtrips to/from client
> 0 sorts (memory)
> 0 sorts (disk)
> 10000 rows processed
I would add that by not doing the formating or transferring the data to something useful - like an application or file - your timings are going to be off. So, it really depends on what is your real goal here. Received on Wed Mar 16 2011 - 19:56:36 CDT