Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: 2 triggers or 1??

Re: 2 triggers or 1??

From: Pete Finnigan <plsql_at_petefinnigan.com>
Date: Wed, 17 Mar 2004 12:05:34 +0000
Message-ID: <S9Tk38AO8DWARxS6@peterfinnigan.demon.co.uk>


Hi,

Simply test both cases, write one version with two triggers and a version with one trigger and run a SQL trace on both and read the trace files, either using tkprof or simply read through the raw trace.

I have not tried it but i would assume there would be more recursive SQL with two triggers as Oracle needs to set up two triggers to run and at least the call to the PL/SQL that the trigger executes will be double. Logically thinking about it i would assume one trigger to perform better performance wise, but whether it is better business logic wise is another matter. Try it and see!

I always find testing things for myself to be more satisfying as you get to see how things work and understand why one method is faster than another for instance.

hth

kind regards

Pete

-- 
Pete Finnigan
email:pete_at_petefinnigan.com
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.
Received on Wed Mar 17 2004 - 06:05:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US