Documente Academic
Documente Profesional
Documente Cultură
Event 10089 level 1: CBO disable index sorting This event is not set by default. By default CBO use index sorting as a tiebreaker method to choose the first index alphabetically in the event of a choice between two plans using indexes with equal costs. There is brief description in Oracle Doc ID 1485410.1
Use event 10053 to show what optimizer is doing when there are two plans using indexes with the same costs. optimizer_capture_sql_plan_baselines is false. Use treeviewer (Hans-Peter Sloot, Robert van der Ende) for 10053 trace file. http://jonathanlewis.wordpress.com/2010/04/30/ 10053-viewer/
Create table t2 create table t2 ( c1 number , c2 number , c3 number , c4 number , c5 number , c6 number , c7 number , c8 number , c9 number , c10 number);
CBO default behavior. Look at the index statistics, they are sorted by index name. Plan used index T2_IDX11.
Event 10089 set. Look at the index statistics, they are not sorted by index_name. They are in the order I created them. Plan used index T2_IDX2.
10g or 11g with event 10089 set. CBO could choose a different index access path for the same sql. In the test case, it changed because the order of indexes no longer sorted alphabetically. On a side note, this event can be used to reduced number of gets on row cache dc_objects during optimization.
http://williamtang2012.wordpress.com/2013/04/02/wait-event-latch-row-cache-objects-dc_objects-2