Doubts on triggers

From: R197509 <ramsunders_at_yahoo.com>
Date: 21 May 2002 23:55:13 -0700
Message-ID: <1e562f83.0205212255.6c066ceb_at_posting.google.com>


Hi,

   We are facing a situation where we need to use triggers to perform a set of complex operations, the details of which are as follows.

   We have a table on which the triggering events would be Insert and Update. The event action would insert a few records in three other tables. We need the trigger event to be fired for every row affected.

   The following are the doubts that we have:

  1. What is the type of trigger that we should use, viz. Before or After. We are not very clear on what the difference between the two is.
  2. If there are bulk inserts or updates on the table, what are the likely constraints that we may face with respect to performance. If we are do a bulk update on the table, do trigger events for each of the rows run in parallel?
  3. Is there some mechanism using which we could commit he transaction from the trigger. This is because we might run into the Rollback Segment going full in case the number of rows updated is very large in number.
  4. As we understand, the size of the trigger action body can be upto 32K. If we call a stored procedure from the trigger event, would the size of the stored procedure also come into account.
  5. Is there a method by which we can cause the insert to happen even if the trigger action fails. I guess one way would be is to handle all exceptions in the trigger action body. Are there any other means to achieve this? Would really appreciate it if you could point out any other short-comings that you might have experienced from using triggers too.

Regards,
Ram. Received on Wed May 22 2002 - 08:55:13 CEST

Original text of this message