• But any idea why @@rowcount would be so slow? The line of code doing the insert is a single row insert. I can't understand why it would be so slow.

    As for the foreign key constraints. The product was first written for SQL 6.0 and they only allowed 16 levels of cascading deletes (as I recall), maybe it was even 8 back then. They had to use triggers instead of RI. They never upgraded their code or design. In fact the company that writes the main product has decided to kill the product we are using.