I recently added an update trigger to a large table (about 800k to 1 Mil.
rows of data).  The trigger is used to create an audit file under certain
situations.  I have a variable that I set if I want the trigger to execute.
The default is to bypasses the trigger code.  
The problem that I have is that the trigger adds an enormous amount of
processing time (10 times longer), even when the trigger is being bypassed.
As a work around, I drop the trigger  when the trigger when it is not
needed, instead of using the bypass.
Is this behavior normal or do I have something wrong with my code or my
process.

Her is my trigger bypass code:

SET VAR vTRIG_OFF INTEGER
IF vTRIG_ON IS NULL THEN
  RETURN 0
ENDIF
Trigger code...
RETURN

John




Reply via email to