Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003

    Question Unanswered: Triggers and performance

    Here I am....triggers are becoming my best husband will be very jealous...

    A question rose in my head while creating a trigger on a large and critical table....
    There are impacts on performance using a trigger?
    My table is read by on line transaction and updated in the same time....performance are our problem every day....
    In a plan table for example does the trigger appear somehow?
    Ah...for each trigger there is an insert that write the old row on a different table...

    Someone has an idea?

    Data Base Administrator

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Yes, Triggers effect performance. Using you example where you have a Trigger basically performing a logging operation (copying rows to another table on Update and/or insert), DB2 will now have to perform an additional operation Iinsert) for every row that is inserted/updated in the master table, and inserts are the most expensive thing to execute in terms of performance. Even Triggers that do not do any I/O will have some performance drawback because it still requires CPU cycles to execute the trigger.

    Triggers are nice, but to maximize performance, just use them judiciously--and that should allow your husband to see more of you



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts