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

Home -> Community -> Usenet -> c.d.o.misc -> Re: No automatic indexes

Re: No automatic indexes

From: Brian Peasland <oracle_dba_at_nospam.peasland.net>
Date: Thu, 15 Jun 2006 14:55:21 GMT
Message-ID: <J0wpGD.9BH@igsrsparc2.er.usgs.gov>


Brex wrote:
> Thank you guys for your comments.
>
> The reason I don't want to generate indexes automatically when creating
> tables with Pk in Oracle is that I'm creating my tables with a
> powerdesigner script in which model I've already defined pks, fks and
> indexes(half of them are defined on the same columns as the ones in the
> primary keys).

Why create indexes on the PK column?

> PD is obviously generating a CREATE INDEX statement
> after a CREATE TABLE and when running the script, Oracle complains
> because some columns are already indexed.

Is PD doing this for the PK constraint too? If so, then that is a problem with PD, not Oracle.

> What we are doing now is generating separate PD scripts, one for
> tables, one for indexes and one for primary keys, which are executed in
> the same order, so indexes are created before Pk. But we'd like to
> generate all in one script.

Why not write a wrapper script which just calls all three of the other scripts? For instance, PD generates scripts SCRIPT_A, SCRIPT_B, and SCRIPT_C. Your wrapper script would simply call all of these other scripts as follows:

@script_a
@script_b
@script_c

HTH,
Brian

-- 
===================================================================

Brian Peasland
oracle_dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Thu Jun 15 2006 - 09:55:21 CDT

Original text of this message

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