Subject | Re: [ib-support] Mass deletion |
---|---|
Author | Lista de Discução Interbase |
Post date | 2002-04-09T19:59:29Z |
At 16:39 09/04/02 +0530, you wrote:
But I prefer code this in a trigger, because, if I want to code other
rules, re-calculations, etc. I have more "liberty".
But Ann said that the index created by the FK causes delete to be very
slow. And suggested that you drop the constraint. I am sure she is right
but, If the database is in production I think it will be an annoing thing
to do.
Did you test the Stored Procedure way to do ? I think it could be the
better way, but only testing with your data could give the right answer.
HTH
Alexandre
>HiYou have a type error in FOREIGN KEY
>
>I tried dropping the Foreign key constraint. But no way. It just freezes
>after some time.
>
>Am trying out triggers and stored procedures as suggested by others in the
>list.
>
>I tried recreating the constraint with a ON DELETE CASACADE.
>
>But somehow i am not getting the sytax right.
>
>I gave something like
>
>ALTER TABLE DRUG_BILL_ITEM ADD FORIEGN KEY (BILL_ID) REFERENCES DRUG_BILL
>(BILL_ID) ON DELETE CASCADE
But I prefer code this in a trigger, because, if I want to code other
rules, re-calculations, etc. I have more "liberty".
>If i get it correct would it work ?Yes !
But Ann said that the index created by the FK causes delete to be very
slow. And suggested that you drop the constraint. I am sure she is right
but, If the database is in production I think it will be an annoing thing
to do.
Did you test the Stored Procedure way to do ? I think it could be the
better way, but only testing with your data could give the right answer.
HTH
Alexandre