Autotrace a large table : autotrace « SQL Plus « Oracle PL / SQL






Autotrace a large table

   
SQL>
SQL> create table my_all_objects
  2  nologging
  3  as
  4  select * from all_objects
  5  union all
  6  select * from all_objects
  7  union all
  8  select * from all_objects
  9  /

Table created.

SQL>
SQL>
SQL> set autotrace traceonly
SQL>
SQL> select owner, count(*)
  2  from my_all_objects
  3  group by owner;

13 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 2509106709

-------------------------------------------------------------------------------------
| Id  | Operation          | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |                | 33589 |   557K|   136   (6)| 00:00:02 |
|   1 |  HASH GROUP BY     |                | 33589 |   557K|   136   (6)| 00:00:02 |
|   2 |   TABLE ACCESS FULL| MY_ALL_OBJECTS | 33589 |   557K|   130   (2)| 00:00:02 |
-------------------------------------------------------------------------------------

Note
-----
   - dynamic sampling used for this statement


Statistics
----------------------------------------------------------
         48  recursive calls
          0  db block gets
        537  consistent gets
        466  physical reads
          0  redo size
        694  bytes sent via SQL*Net to client
        380  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
         13  rows processed

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

Table dropped.

SQL>
SQL>
SQL>

   
    
  








Related examples in the same category

1.autotrace command
2.Autotrace on and off
3.Autotrace lower text function
4.Autotrace running total
5.Autotrace a query on a huge table
6.Autotrace a query with group clause
7.Execution Plan
8.autotrace a nested query
9.set autotrace on explain for every single statement
10.set autotrace traceonly explain for bitmap index
11.set autotrace traceonly explain, and condition
12.set autotrace traceonly statistics
13.set autotrace traceonly statistics for 'select * from tableName'
14.set autotrace traceonly
15.AUTOTRACE exists (subquery)
16.AUTOTRACE table joining
17.AUTOTRACE table joining and aggregate function
18.autotrace ansi full outer join
19.autotrace count(*)
20.autotrace ctxsys.context index
21.autotrace merge command
22.autotrace table with/without an index