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: Bizarre index creation - something wrong?

Re: Bizarre index creation - something wrong?

From: Vladimir M. Zakharychev <bob--nospam--_at_dynamicpsp.com>
Date: Wed, 7 Jun 2006 15:25:24 +0400
Message-ID: <e66d3b$264b$1@hypnos.nordnet.ru>

"Paulie" <plinehan_at_yahoo.com> wrote in message news:1149676667.760683.25360_at_j55g2000cwa.googlegroups.com...
>
> Why issue two commands in the first place - why not just
> create the primary key on the two fields and not bother
> with the unique index?
>

Because if you do, Oracle will go through the burden of creating that unique index anyway, but unless you explicitly name the constraint and use USING INDEX clause, both index and constraint will receive system-generated names and index will be created with default storage attributes. Some people might prefer to use short cut, some might want more control on underlying index properties. I think it's a matter of personal preference.

-- 
   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)
   http://www.dynamicpsp.com 
Received on Wed Jun 07 2006 - 06:25:24 CDT

Original text of this message

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