How Oracle pick up which Index to use?
We have a table TAB, which has 2 idnexes T_IDX1 and T_IDX2. We use Oracle 10g, and optimizer mode is default "ALL ROWS".
T_IDX1: TAB.c1, TAB.c2, TAB.c3, TAB.c4
T_IDX2: TAB.c1, TAB.c5, TAB.c6, TAB.c7, TAB.c8, TAB.c9
Code: Select c2, c3, c5, c7, c12, c13, c16 from TAB where c1=xxx and c2=xxx and c3=xxxx and c5=xxxx and c7=xxxxx;
I expect Oracle will use T_IDX1 to do the search, however Oracle pick up T_IDX2.
What could be the reason?
Thanks,