Instantiating COM objects is a time consuming process

Posted by

To view Verified answers click on the button below.

The trigger is written to instantiate a COM object and pass the newly insterted rows
to it for some custom processing.

What do you think of this implementation? Can this
be implemented better?

Instantiating COM objects is a time consuming process and since you are doing it from
within a trigger, it slows down the data insertion process. Same is the case with sending
emails from triggers. This scenario can be better implemented by logging all the necessary
data into a separate table, and have a job which periodically checks this table and does the needful.