set autotrace traceonly statistics for 'select * from tableName' : autotrace « SQL PLUS Session Environment « Oracle PL/SQL Tutorial






SQL>
SQL> create table t as select * from all_objects where 1=0;

Table created.

SQL>
SQL> select * from t;

no rows selected

SQL>
SQL> set autotrace traceonly statistics
SQL>
SQL> select * from t;

no rows selected


Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
          3  consistent gets
          0  physical reads
          0  redo size
        995  bytes sent via SQL*Net to client
        369  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          0  rows processed

SQL>
SQL> set autotrace off
SQL>
SQL> insert into t select * from all_objects;

12599 rows created.

SQL>
SQL> rollback;

Rollback complete.

SQL>
SQL> select * from t;

no rows selected

SQL>
SQL> set autotrace traceonly statistics
SQL>
SQL> select * from t;

no rows selected


Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
        166  consistent gets
          0  physical reads
          0  redo size
        995  bytes sent via SQL*Net to client
        369  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          0  rows processed

SQL>
SQL> set autotrace off
SQL>
SQL> drop table t;

Table dropped.

SQL>
SQL>








29.36.autotrace
29.36.1.Autotrace explain a select statement
29.36.2.autotrace traceonly statistics
29.36.3.set autotrace traceonly statistics to trace a function
29.36.4.set arraysize 5
29.36.5.Introduction to SQL Tuning - Workshop
29.36.6.set autotrace traceonly explain for bitmap index
29.36.7.set autotrace traceonly explain, and condition
29.36.8.set autotrace traceonly statistics
29.36.9.set autotrace traceonly statistics for 'select * from tableName'
29.36.10.AUTOTRACE exists (subquery)
29.36.11.AUTOTRACE table joining
29.36.12.AUTOTRACE table joining and aggregate function