Autotrace a table with two indexes : Index STATISTICS « Index « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » Index » Index STATISTICS 
Autotrace a table with two indexes
 
SQL>
SQL>
SQL> set echo on
SQL>
SQL> create table t as
  2  select from all_objects;

Table created.

SQL>
SQL> create index t_idx1 on t(object_name);

Index created.

SQL>
SQL> create index t_idx2 on t(object_type);

Index created.

SQL>
SQL> set autotrace traceonly
SQL> select from t t1 where object_type in'FUNCTION','PROCEDURE', 'TRIGGER' );

520 rows selected.


Execution Plan
--------------------------------------------------
Plan hash value: 831817202

--------------------------------------------------
-------------------------------------

| Id  | Operation                    | Name   | Ro
ws  | Bytes | Cost (%CPU)| Time     |

--------------------------------------------------
-------------------------------------

|   SELECT STATEMENT             |        |
596 76288 |     7   (0)00:00:01 |

|   |  INLIST ITERATOR             |        |
    |       |            |          |

|   |   TABLE ACCESS BY INDEX ROWID| T      |
596 76288 |     7   (0)00:00:01 |

|*  |    INDEX RANGE SCAN          | T_IDX2 |
 52 |       |     3   (0)00:00:01 |

--------------------------------------------------
-------------------------------------


Predicate Information (identified by operation id)
:

--------------------------------------------------
-


   - access("OBJECT_TYPE"='FUNCTION' O"OBJECT_
TYPE"='PROCEDURE' OR

              "OBJECT_TYPE"='TRIGGER')

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


Statistics
--------------------------------------------------
        248  recursive calls
          0  db block gets
        243  consistent gets
          3  physical reads
          0  redo size
      28155  bytes sent via SQL*Net to client
        754  bytes received via SQL*Net from clien
t
         36  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
        520  rows processed

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

Table dropped.

SQL>
SQL> --

 
Related examples in the same category
1. Compute Index statistics
2. Create index and check the Execution Plan
3. Discovering When an Index Is Useful
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.