OK, here’s what I would do:
-
Check to see if you need both indexes [IX_ACCOUNT_ID_POINTS_CODE] and [IX_ACCOUNT_ID] as they may be redundant.
-
Before you do the
INSERT, Disable the Trigger and drop the Foreign Keys. -
Do the
INSERTsetting the fields normally set by the Trigger, and insuring that the FK Column’s values are valid. -
Re-Enable the trigger, and re-create the Foreign Keys WITH NOCHECK.
I would leave the indexes on as you are inserting less than 0.2% of the total row count so it’s probably faster to update them in-place rather than to drop and rebuild them.