Message-Id: <10492.105272@fatcity.com> From: Webber Valerie H Date: Tue, 9 May 2000 15:19:42 -0400 Subject: RE: indexes This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BFB9EB.86CF07D2 Content-Type: text/plain; charset="ISO-8859-1" 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@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@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 Valerie.H.Webber@m1.irs.gov 704-569-1002 x107 ------_=_NextPart_001_01BFB9EB.86CF07D2 Content-Type: text/html; charset="ISO-8859-1" 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@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@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
Valerie.H.Webber@m1.irs.gov
704-569-1002 x107