Sami

They are both vTRIG_ON. that was a typo.

 

Larry

One of the tables with a trigger is a master catalog of products.  There are
many updates to the file where I do not want to create an audit file.  For
instance, after an inventory, I go out and update the current on hand
qty/previous on hand qty and there is no reason to create an audit file.
However, the process is slowed to a crawl because there is an update trigger
on the table.  As I mentioned before, I use a lot of triggers and I never
realized that they have such a heavy impact on performance.

 

John

 

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Sami Aaron
Sent: Tuesday, September 09, 2008 11:08 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Triggers

 

John -

 

I'm going to point out the obvious just in case it addresses your problem.
In the sample code you posted, you refer to TWO variables:  vTRIG_OFF   and
vTRIG_ON    Should they be the same?

 

Sami

 

____________________________

Sami Aaron

Software Management Specialists

913-915-1971

[EMAIL PROTECTED]

 

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John Engwer
Sent: Tuesday, September 09, 2008 8:17 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Triggers

 

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