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

Home -> Community -> Usenet -> c.d.o.server -> Re: Unique contraints vs. Unique indexes

Re: Unique contraints vs. Unique indexes

From: Robert Fazio <rfazio_at_home.com.nospam>
Date: Wed, 15 Aug 2001 01:09:15 GMT
Message-ID: <%Yje7.104174$EP6.26776382@news1.rdc2.pa.home.com>

--
Robert Fazio
Senior Technical Analyst
dbabob_at_yahoo.com

"Howard J. Rogers" <howardjr_at_www.com> wrote in message
news:3b78fa2d_at_usenet.per.paradox.net.au...
>

> Personally, I think you'd be utterly mad NOT to create them deferrable.
If
> those constraints are enforced with a unique index, then the index is
> dropped the second you disable the constraint, and thus will need complete
> re-creation.
I agree with that on very large tables, which is what we are talking about, but enlighten me on two items. One. I personally can't think of a reason where I would really want to wait until commit to check the uniqueness of my values. Can you give me an example? Two. Realizing that the values will actually be unique, even though the index isn't, an explain plan will of course show a range scan rather than a unique scan. The cost associated with a range scan is higher, and I can guess that index might be skipped over in some rare instances. And along the same lines, I don't believe it to be the case, but is there additional overhead with the non-unique index?
> But who said being a DBA was a walk in the park?!
Hey don't make fun of what I do all day. Actually lately you have been making me feel like that is all that I do. Guess I have been spending too much time doing project management rather than hitting the books.
Received on Tue Aug 14 2001 - 20:09:15 CDT

Original text of this message

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