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: A Primary Key and Foreign key

Re: A Primary Key and Foreign key

From: Daniel Clamage <dclamageNOSPAM_at_telerama.com>
Date: 1998/12/05
Message-ID: <3668f541.0@paperboy.telerama.com>#1/1

When you re-enable the primary/unique key constraint, simply provide tablespace and storage parameters to put the index where you want it, with storage parameters tuned for the index size. Before you disable the constraints, reverse-engineer the constraint statements with my rev_eng package (see my web site below). It generates syntactically correct DDL, specifically, alter table statements to create the constraint, including the storage parameters.

Reading over your question, I'd say leave the constraints enabled and insert away, unless you're inserting a LOT of data.

In Oracle8 you can disable the constraints without losing the indexes, which is of dubious value if you're populating a table with a lot of data.

--
- Dan Clamage
http://www.telerama.com/~dclamage
If you haven't crashed the Server,
you haven't been trying hard enough.
aaronurbain_at_bigfoot.com wrote in message
<747af1$u5r$1_at_nnrp1.dejanews.com>...

>be aware that in 7.3.4 when you diable a pk constraint the index gets
dropped.
>When you re-enable the constraint, the index gets created in the default
>tablespace, not where you created it originally. Possible headache...
>
>
>
>
>In article <365AD764.C8E6E1EF_at_us.oracle.com>,
> Diego Pafumi <dpafumi_at_us.oracle.com> wrote:
>> Hi gurus !!!
>> I have a little question. I received an application without any
>> specificaton. Actually I have to insert in many tables some data
>> manually.
>> So my question is: How can I "suspend" for a moment all the Primary Keys
>> and Foreign Keys?? Also I'd like to know if there is any eay to create
>> something like a "Data Model". I think that I have to disable all the PK
>> and FK before to insert. Is that right?? Or I have to disable more
>> things??
>>
>> Thanks in advance
>>
>> Diego
>>
>>
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Sat Dec 05 1998 - 00:00:00 CST

Original text of this message

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