Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: orace sql query
fitzjarrell_at_cox.net wrote:
> On Jun 22, 3:45 pm, DA Morgan <damor..._at_psoug.org> wrote:
>
To the best of my knowledge the document is incorrect.
The index is used to speed the search for a duplicate value ... not to enforce it.
I will gladly stand corrected on this if someone has reason to believe otherwise but were that not true you could not enforce uniqueness with a non-unique index.
I didn't find the support I wanted in the time I have available right now but let me quote from Tom Kyte: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3051352977204
o a constraint MIGHT create an index or use an existing index to efficient[ly] enforce itself. For example, a PRIMARY KEY constraint will either create an index (unique or non-unique depending) or it will find an existing suitable index and use it.
o an index has nothing to do with a constraint. An index is an index.
So, a constraint MIGHT create/use and index. An INDEX is an INDEX, nothing more, nothing less."
Please send me the link to the document in question. Thanks.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Sat Jun 23 2007 - 13:10:00 CDT