Database Tuning (MOSC)

MOSC Banner

How Oracle pick up which Index to use?

edited Jan 15, 2010 3:56AM in Database Tuning (MOSC) 14 commentsAnswered
 Hi,

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,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center