Quote:> Stephen:
> You seem to be aware of the trade-offs between referential integrity
> checking and performance.
> Is your question how to not have to make the choice between the two? That
> is, how can you have it both ways?
I just thought I might be a command which says "apply checking to rows
inserted,updated, deleted since the FK constraint was dropped".
I assume I would gain because the checking would be done all at once.
But in practice since I wrote this message, I realise that the Import apps
written (see other message), do all the checks necessary (they really do)
before changes are made to the database. For example before a row is added
to Table1 a lookup is done in a C++ map container for an entry on Table 2,
if not found, a lookup is done on the database and if the row is really
absent, it is scheluded to be added to table 2 before the corresponding
entry is done on table 1.
Therefore, I can safely temporarily turn off the FK constraints while
changing the database and reapply them.
thanks
Stephen Howe