× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Another thought, the constraint you're creating requires a primary key
constraint on table2. If it's not there it will be built for you. Perhaps
it's building the primary key constraint on table 2?

-Walden

------------
Walden H Leverich III
President
Tech Software
(516)627-3800 x11
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com



-----Original Message-----
From: PatrickConner@parkdalemills.com
[mailto:PatrickConner@parkdalemills.com]
Sent: Monday, January 07, 2002 13:54
To: midrange-l@midrange.com
Subject: sql - Drop and Add constraints



Sorry about not changing the subject on the last reply.

We have a process that drops the constraints on tables (physical files),
clears them with a CLRPFM, and then rebuilds the constraints. At first this
process took 20 minutes. Now it takes 2 1/2 hours. My question is why? or
how is this possible?

Here is a small sample:

RUNSQLSTM  SRCFILE(SourceLib/SourceFile) SRCMBR(Member1) +
             NAMING(*SQL) DFTRDBCOL(DataLib)

CLRPFM     FILE(Table1)
.
.

RUNSQLSTM  SRCFILE(SourceLib/SourceFile) SRCMBR(Member2) +
             NAMING(*SQL) DFTRDBCOL(DataLib)

Here is some of the sql source from each member:

Member1:
ALTER TABLE Table1
       DROP CONSTRAINT R_1848;

Member2:
ALTER TABLE Table1
       ADD CONSTRAINT R_1848
              FOREIGN KEY (key1, key2)
                             REFERENCES Table2
                             ON DELETE CASCADE
                             ON UPDATE RESTRICT;



Patrick Conner
www.ConnecTown.com
(828) 244-0822



Yes.

Is this the correct forum for SQL questions?



_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.