Message-Id: <10493.105325@fatcity.com> From: Webber Valerie H Date: Wed, 10 May 2000 08:07:49 -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_01BFBA78.62585A24 Content-Type: text/plain; charset="ISO-8859-1" Chris, You hit the nail on the head! Does anyone know if this is true about indexes/PK/FK? Val -----Original Message----- From: Chris Griffith [mailto:Chris.Griffith@dstm.com] Sent: Tuesday, May 09, 2000 5:32 PM To: Multiple recipients of list ORACLE-L Subject: RE: indexes 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----- Sent: Tuesday, May 09, 2000 4:37 PM To: Multiple recipients of list ORACLE-L 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----- Sent: Tuesday, May 09, 2000 12:35 PM To: Multiple recipients of list ORACLE-L 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----- Sent: Tuesday, May 09, 2000 11:10 AM To: Multiple recipients of list ORACLE-L 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 -- Author: Chris Griffith INET: Chris.Griffith@dstm.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01BFBA78.62585A24 Content-Type: text/html; charset="ISO-8859-1" RE: indexes

Chris,

You hit the nail on the head! Does anyone know if this is true about indexes/PK/FK?

Val

-----Original Message-----
From: Chris Griffith [mailto:Chris.Griffith@dstm.com]
Sent: Tuesday, May 09, 2000 5:32 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: indexes


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-----
Sent: Tuesday, May 09, 2000 4:37 PM
To: Multiple recipients of list ORACLE-L


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-----
Sent: Tuesday, May 09, 2000 12:35 PM
To: Multiple recipients of list ORACLE-L


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-----
Sent: Tuesday, May 09, 2000 11:10 AM
To: Multiple recipients of list ORACLE-L



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


--
Author: Chris Griffith
  INET: Chris.Griffith@dstm.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may