Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Which index is used when multiple are valid

Re: Which index is used when multiple are valid

From: Alan <alan_at_erols.com>
Date: Mon, 3 Nov 2003 16:05:02 -0500
Message-ID: <bo6ftp$18d1v6$1@ID-114862.news.uni-berlin.de>

Under RBO, the optimizer should choose the rightmost first, so, "B". For best performance, use the index that will return the fewest rows as the rightmost.

"Daniel Roy" <danielroy10junk_at_hotmail.com> wrote in message news:3722db.0311030943.4a1dcd76_at_posting.google.com...
> Hi guys,
> I've been asked a question for which I'm not too sure. We use Oracle
> 9.2, with RBO (we're stuck with that choice because we use Siebel,
> please don't go there...). One of the DBA's asserts that if 2 indices
> are valid for a query, then the one created the latest will be used.
> Here's an example to make things clearer:
>
> select * from my_table where col_a = 'A' and col_b = 'B';
>
> Let's say I have 2 examples on this table: ind_a(col_a, col_b) and
> ind_b(col_b, col_a). Which one will my query use, and why?
>
> Daniel
Received on Mon Nov 03 2003 - 15:05:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US