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 -> autotrace

autotrace

From: Prasath <prasath.rao_at_gmail.com>
Date: 17 Jul 2006 03:42:04 -0700
Message-ID: <1153132924.367866.270190@m73g2000cwd.googlegroups.com>


Why does the statistics report in the explain plan take more time to be generated?

When I use "set autotrace traceonly explain", it takes zero seconds for the plan to be generated. If the autotrace is set to "set autotrace traceonly explain statistics" then it takes 14 seconds. Any idea why this happens?

SQL> desc test_p

 Name                                      Null?    Type
 ----------------------------------------- -------- -----------------
 MYCOL1                                             NUMBER

SQL> truncate table test_p;

Table truncated.

Elapsed: 00:00:00.00
SQL> set autotrace traceonly explain
SQL> select * from test_p;
Elapsed: 00:00:00.00

Execution Plan


   0 SELECT STATEMENT Optimizer=CHOOSE    1 0 TABLE ACCESS (FULL) OF 'TEST_P' SQL> set autotrace traceonly explain statistics SQL> / no rows selected

Elapsed: 00:00:14.04

Execution Plan


   0 SELECT STATEMENT Optimizer=CHOOSE    1 0 TABLE ACCESS (FULL) OF 'TEST_P' Statistics


          0  recursive calls
          0  db block gets
          3  consistent gets
          0  physical reads
          0  redo size
        140  bytes sent via SQL*Net to client
        232  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          0  rows processed
Received on Mon Jul 17 2006 - 05:42:04 CDT

Original text of this message

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