Subject Re: [ib-support] Mass deletion
Author Nataraj S Narayanan
On Thu, 11 Apr 2002, Nick Upson wrote:

>
> do you have an index on DRUG_BILL_ITEM for BILL_ID? otherwise IB/FB
> will do a tablescan for every delete.
>

Yikes!!! That did it.

I created a new index on bill_id even though there was already one by name
rdb$foreign30.

Before that i had dropped the forign key constraint in the detail table by
name integ_90. Otherwise the on delete trigger in the master table would
not work.

Now the deletion of 1.8 lac records works like a song (a few minutes). I
have to do a sweep to display the data fast.

What beats me is that since the column bill_id in the detail table is a
foerign key, shouldnt the deletion of the constrint remove the coulun
bill_id? If that is the case ,if there exists no foriegn key itself, how
are we able to create a new index ?


regards

--
Nataraj S Narayanan
Synergy Info Systems
Kochi,India-683 503
Ph:91 484 557244