Posts Tagged: index

How to print explain plan

Posted by & filed under Oracle.

DELETE PLAN_TABLE; EXPLAIN PLAN FOR SELECT * FROM t WHERE group2=1; SELECT * FROM TABLE(dbms_xplan.display()); Oracle utilities The Oracle utility creating PLAN_TABLE: D:\Oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlxplan.sql The Oracle utility displays the last explain plan. It displays also parallel query information if the plan happens to run parallel: D:\Oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlxplp.sql The utility that does not displays parallel query information (sequential). […]

Selectivity and Execution Plan

Posted by & filed under Oracle.

Cardinality is how many rows should be returned after evaluating predicates. Selectivity is cardinality divided by the total number of input rows. DBMS uses selectivity for choosing the right index. Density is characteristic of data in a column. It is equal to 1 divided by the number of distinct values. Let's consider few examples of […]