hmackintosh
IS-IT--Management
I have a question on how to speed up the performance of a delete statement. Here is the background: I have one table (TINST_FIN) that has about 10 reference tables attached to it. The key to this table is ORG_UNIQ_NUM and ORG_EFF_DTE. The primary key of this table is a non-primary key in another table (TINST_BR). The RI rules between TINST_FIN and TINST_BR are restrict delete.
So I added one record to TINST_FIN and no dependent records in TINST_BR. Now I try to delete the one record I added with the following statement:
delete
from sim.tinst_fin
where org_uniq_num = 417636
and org_eff_dte = '2001-01-01'
This statement takes 2 minutes and 15 seconds to execute. The DBA ran a reorg and updated the statistics on all the tables.
Is there something else that can speed up the performance besides removing the RI?
So I added one record to TINST_FIN and no dependent records in TINST_BR. Now I try to delete the one record I added with the following statement:
delete
from sim.tinst_fin
where org_uniq_num = 417636
and org_eff_dte = '2001-01-01'
This statement takes 2 minutes and 15 seconds to execute. The DBA ran a reorg and updated the statistics on all the tables.
Is there something else that can speed up the performance besides removing the RI?