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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Index on Primary Key

Re: Index on Primary Key

From: Snow Tracks <snowtracks_at_compuserve.com>
Date: Fri, 23 Apr 1999 07:44:41 -0700
Message-ID: <u#l99cZj#GA.283@ntawwabp.compuserve.com>


Thanks for the feeback, Rich.
>
>The default behavior of Oracle is to index the primary key IF A MATCHING
INDEX
>DOES NOT ALREADY EXIST.
Are you saying that the default behavior of Oracle is to create an AK that is identical to the PK?

>As long as a primary key is enabled, there is a
>corresponding index. If the primary key is disabled or dropped, the
>corresponding index is dropped IF IT WAS CREATED AUTOMATICALLY BY ORACLE
WHEN
>THE PK WAS CREATED. If the index was defined independently prior to the
>creation of the PK, the index will remain when the PK is dropped.
>
>As a side question, why wouldn't you want an index on a primary key???

The maintenance of an index is overhead. If the index is unnecessary, the additional maintenance load is unnecessary. Why can't the db use the PK? How does the db benefit from maintaining an AK that is identical to the PK? Received on Fri Apr 23 1999 - 09:44:41 CDT

Original text of this message

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