Subject | Re: Disable Index with ref integrity on Interbase 6.01? |
---|---|
Author | alex_vnru |
Post date | 2002-01-13T16:09:18Z |
--- In ib-support@y..., "M Tuttle" <miket@s...> wrote:
Constraint" Primary Key, it is used to check uniqueness of the values
in PK columns. Only general index can be deactivated. To improve
import performance you can drop constraint primary key on the table
(if it is not referenced from Foreign Key constraints in other
tables), make import and try to re-create Primary Key. But:
1. You can do it only being the only connected to database.
2. If imported data have duplicated values in PK columns you'll get an
exception when re-creating PK. If so, you should find duplicates and
make a decision what to do with them - update or delete.
3. Perhaps you will be forced to disconnect/connect if there will be
message "object in use" when you try to drop or create constraint.
So, it's possible, but not simply. You have to think once more, is
it reasonable and acceptable workaround for you task.
Best regards, Alexander V.Nevsky.
> When I try to set the index to InActive with this statement...by
> ALTER INDEX RDB$PRIMARY1 INACTIVE
>
> I receive the following error:
> Unsuccessful metatupdate MODIFY RDB$INDICESS failed action cancelled
> trigger (2) to preserve data integrity. Cannot deactivate indexused by an
> Integrity Constraint.Hi, Mike. You can't in IB "deactivate index used by an Integrity
Constraint" Primary Key, it is used to check uniqueness of the values
in PK columns. Only general index can be deactivated. To improve
import performance you can drop constraint primary key on the table
(if it is not referenced from Foreign Key constraints in other
tables), make import and try to re-create Primary Key. But:
1. You can do it only being the only connected to database.
2. If imported data have duplicated values in PK columns you'll get an
exception when re-creating PK. If so, you should find duplicates and
make a decision what to do with them - update or delete.
3. Perhaps you will be forced to disconnect/connect if there will be
message "object in use" when you try to drop or create constraint.
So, it's possible, but not simply. You have to think once more, is
it reasonable and acceptable workaround for you task.
Best regards, Alexander V.Nevsky.