Database Reference
In-Depth Information
EODA@ORA12CR1> exec dbms_stats.gather_table_stats( user, 'IOT_ADDRESSES' );
PL/SQL procedure successfully completed.
Now we are ready to see what measurable difference we could expect to see. Using AUTOTRACE, we'll get a
feeling for the change:
EODA@ORA12CR1> set autotrace traceonly
EODA@ORA12CR1> select *
2 from emp, heap_addresses
3 where emp.empno = heap_addresses.empno
4 and emp.empno = 42;
Execution Plan
----------------------------------------------------------
Plan hash value: 775524973
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4 | 292 | 8 (0)|
00:00:01 |
| 1 | NESTED LOOPS | | 4 | 292 | 8 (0)|
00:00:01 |
| 2 | TABLE ACCESS BY INDEX ROWID | EMP | 1 | 27 | 2 (0)|
00:00:01 |
|* 3 | INDEX UNIQUE SCAN | EMP_PK | 1 | | 1 (0)|
00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID BATCHED| HEAP_ADDRESSES | 4 | 184 | ...
|* 5 | INDEX RANGE SCAN | SYS_C0032863 | 4 | | 2 (0)|
00:00:01 |
--------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - access("EMP"."EMPNO"=42)
5 - access("HEAP_ADDRESSES"."EMPNO"=42)
Statistics
----------------------------------------------------------
1 recursive calls
0 db block gets
11 consistent gets
0 physical reads
0 redo size
1361 bytes sent via SQL*Net to client
543 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4 rows processed
 
Search WWH ::




Custom Search