RE: dbload & constraints
Posted in 1995
> it another try. [sic]
> Question: Without the ability to defer contstraints, how can one
> use the dbload script to load large amounts of data into a heavily constrained
> database? Does dbload perform an implied defer constraints?
>
> Thanks for your help.
>
[.sig that has to be edited to fit after the > deleted...]
Since I gave a wiseass answer earlier I feel compelled to help now, though
I don't know much about constraints. (ain't it obvious? ;)
According to TFM, (Informix Guide to SQL Reference, Sep 92 rev A pg 7-71)
constraints are enforced through indexes. Since dbload updates the index
as it loads (Informix OnLine Admin Guide, v 5.0 Dec 91 pg 7-12) there doesn't
seem to be a way to defer constraints short of dropping them for the duration
of the load command (same with indexes.)
If you are worried about your data not conforming to the constraints, then
dbload is not what you want to use. dbload is a tool for moving data from
one database to another, where it comes from a "clean" source. To perform
decent error checking you should run the data thru a program which can tell
you what went wrong row-by-row. We've learned this the hard way here, and
we're in the process of building additional levels of data checking before
and after a dbload process. Think about that.
Good luck,
__________________________________________________________________
| Clem Akins Standard Disclaimers Apply |
|Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" |
| Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com |
|________________________________________________________________|