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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: indexes

RE: indexes

From: Chris Griffith <Chris.Griffith_at_dstm.com>
Date: Tue, 9 May 2000 16:06:04 -0400
Message-Id: <10492.105275@fatcity.com>


Good question, I've wondered the same thing. Add to that question if you have a Primary key with 3 columns A,B,C in the PK and have a foreign key on column A,B will the PK index be used for A,B to prevent the table lock on the referenced table.

-----Original Message-----

From: Webber Valerie H [mailto:Valerie.H.Webber_at_irs.gov] Sent: Tuesday, May 09, 2000 4:37 PM
To: Multiple recipients of list ORACLE-L Subject: RE: indexes

Is it safe to say that Oracle will use the composite index on A,B,C if A is a foreign key. What I'm getting at is that I don't need a separate index on column A which is a foreign key if I already have the composite index A,B,C  

Thanks for all the help!
Val

-----Original Message-----

From: Kirsh, Gary [mailto:gary.kirsh_at_gs.com] Sent: Tuesday, May 09, 2000 12:35 PM
To: Multiple recipients of list ORACLE-L Subject: RE: indexes

Valerie,  

I believe it can use the A column of the index, but not the C column, so depending on how selective A is, this may or may not be a good thing.  

Gary  

Gary Kirsh
Next Extent, Inc.

-----Original Message-----

From: Webber Valerie H [mailto:Valerie.H.Webber_at_irs.gov] Sent: Tuesday, May 09, 2000 11:10 AM
To: Multiple recipients of list ORACLE-L Subject: indexes

I know this issue has been discussed before but I can't find the answer in my list archives.

If you have a composite index on a table consisting of columns A,B,C in that order, will the index be used if I have a query/where clause on columns A and C?

I know that it will if I query on A alone or A,B or A,B,C but I can't find documentation about A and C (no B)

Thanks in advance!
Val

Valerie H. Webber
Management Systems Designers, Inc Received on Tue May 09 2000 - 15:06:04 CDT

Original text of this message

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