Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: pros and cons
The idea is good and I've used it a lot. The only gotcha I'm aware of is if
you ever have to create / re-create the index from scratch with data already
in the table then the index build followed by enabling the PK constraint takes
longer than just creating an old style PK index.
This is because Oracle has to re-scan the whole table checking for duplicates
when it enables the PK constraint.
HTH. Chris
Quoting Sai Selvaganesan <ssaisundar_at_sbcglobal.net>:
> hi
>
> i read the follwing line in oracle 9i documentation,
>
> Unique and primary keys can use non-unique as well as unique indexes. They
> can even use just the first few columns of non-unique indexes.
>
> i am planning to use a primary key constraint enforced by the first few
> columns of a non-unique index.any feedback or advice or gotchas in having
> such a setup.
>
> thanks
> sai
>
Chris Dunscombe
chris_at_thedunscombes.f2s.com
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed Mar 31 2004 - 03:44:24 CST
![]() |
![]() |