Rdb on OpenVMS, IBM zSeries and Oracle on OpenVMS (MOSC)

MOSC Banner

RDBPROD Choosing an index only retrieval

edited Jan 10, 2014 6:38AM in Rdb on OpenVMS, IBM zSeries and Oracle on OpenVMS (MOSC) 2 commentsAnswered
This is a hypothetical based on reality (and to see whether it is worth logging a call)
If I have a table with say 5 fields in it - A,B,C,D,E and I have two indices,
 Ind1 (A,B) and
 Ind2 (B,A,C,D)
 both indices are unique.

IF I then do a query such as
  SELECT C from TABLE WHERE A = 'xx' and B = 'XX';

is it reasonable to expect that the optimiser would always choose
to do an index only retrieval using ind2 and not use ind1 and direct read of record ?

Is there some circumstances where the optimiser would be right to choose ind1 and

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