<<
3 indexes      Custno, Invno, IDTrans  (all unique numbers)
>>

Is there a reason you need three separate unique indexes in one table?  
Reducing the number might help optimize.

<<
  1 rule:    Ardetail.INVNO IS NOT NULL AND NOT Ardetail.INVNO IN ( SELECT 
INVNO FROM Ardetail #T1 WHERE #T1.INVNO = Ardetail.INVNO )
>>


I think this might be your problem, or part of it.  Every insert or update of 
InvNo is causing a SELECT of all the InvNos already in the table.  You can 
eliminate this by:

1. Recreating the index on InvNo as either a UNIQUE index, or a PRIMARY KEY 
constraint and getting rid of the rule.

2. Alternatively (still slow, but probably not SO slow), rewriting the rule to 
use NOT EXISTS instead of InvNo NOT IN (and definitely not NOT InvNo IN).

--
Larry

Reply via email to