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: index usage question

Re: index usage question

From: <michael_bialik_at_my-deja.com>
Date: Tue, 30 Nov 1999 21:55:52 GMT
Message-ID: <821h55$44j$1@nnrp1.deja.com>


Hi.
 With these 2 indexes - both of them may be used, because for both of  them only first index field matches.
 If you want to improve it then define second index as :   client, document_num,...
 In that case the percentage of matching fields will be greater   ( 2/4 instead of 1/4 for PK ).

 HTH. Michael.

In article <8216mu$rqa$1_at_nnrp1.deja.com>,   usmrall <srallapally_at_netscape.net> wrote:
> Hello all,
> How does Oracle decide which index to use, in a rule based world ?
> I did read up on the tuning guid for RBO, but I have a wierd case
> so here goes...
> my where clause is as follows
> where client = 50 and document_num = 100 and rownum < 2
> there are two indexes
> index a: client,company_code,posting_date,document_num (PK index)
> index b: client,company_code,posting_docu,document_num
>
> Oracle ends up using the primary key index. Now, I was under the
> impression that in RBO an index matching the WHERE predicate would
> be used ! Was I wrong or is there some logic to this?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 30 1999 - 15:55:52 CST

Original text of this message

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