SQL Server Performance

Using trigger

Discussion in 'SQL Server 2005 General Developer Questions' started by wkm1925, Dec 2, 2009.

  1. wkm1925 New Member

    Did anyone using trigger will burden the performance?
    Is that true or only mith?
  2. FrankKalis Moderator

    That kind of depends on what you do inside the trigger and how often it is fired. Trigger run synchronously. So, everything will wait to wait until the trigger finishes. If you have complex logic inside the trigger or you're even calling external processes (many people think it's a good idea to send mail from triggers, for example), you're likely to hurt performance. Think carefully if you really need a trigger or can achieve your goal otherwise and if you need a trigger keep its logic as simple as possible.
  3. Adriaan New Member

    If you need to call external processes "from a trigger", it's usually a good idea to let the trigger log the necessary details in a working table, then set up a job that checks the working table for new entries, and launch the external process.

Share This Page