title: Can I conditionally avoid hitting a trigger completely?
body: <p>We had to use a trigger to sync an old system to the new system until we can fully deprecate the old system.  The new system doesn't need this trigger at all and, in fact, exits out immediately on the condition that it's the new app.</p>
  
  <p>The impact on the old system is acceptable.</p>
  
  <p>However, the impact on the new system is not because the new system processes many, many more records on a single update.  Merely executing the trigger changes an update from 10 seconds (already "UGH") to over a minute and a half.</p>
  
  <p>The new system performs acceptably by disabling the trigger in code (VS Core with EntityFramework btw), running the update and then re-enabling the code, all within a transaction.  There is disagreement among my colleagues about whether or not the trigger is disabled for the other application while the transaction is being processed.</p>
  
  <p>I have already seen this post:</p>
  
  <p><a href="https://dba.stackexchange.com/questions/204339/sql-server-how-to-disable-trigger-for-an-update-only-for-your-current-session">https://dba.stackexchange.com/questions/204339/sql-server-how-to-disable-trigger-for-an-update-only-for-your-current-session</a></p>
  
  <p>And the first answer is the solution I am using.  My colleagues tell me that won't work.  I believe it will.  But the answers 2-whatever seem to contradict the first answer.</p>
  
  <p>My testing proved out the first answer as well but I need to be 100% sure on this.</p>
  
  <p>TIA</p>