I would like to take this opportunity to point out that this is how Oracle myths get started and/or perpetuated.
You may read a lot of things about Oracle that may no longer be correct, or possibly never were correct.
In this case, as Mark Powell has shown, this was at one time true. Triggers were not compiled in Version 7 of Oracle.
I don't recall which version changed that, but the point is this: Oracle no longer works that way.
A clear cut case where the manual should have been consulted.
Not meaning to pick on anyone, just educate.
Jared
On 6/29/05, Guang Mei <GMei@(protected)> wrote: > > I have read somewhere that when writing a trigger, one should not put all > the code in the trigger, instead one should create a store procedure and > call it from the trigger. Doing so would improve the performance, becuase > oracle will re-compile the trigger code everytime when a trigger is fired. > My question is if there is any paper/doc/study exist somewhere that > compare > the performance. For a typical trigger with say about 20 lines of code, > how > much improvement could one expect if putting the code into a procedure. I > guess I could do some test on the system by myself (too lazy), but > wondering > if I can get some rough idea. I looked around on the web but can not find > any detailed paper out there. > > Thanks. > >
I would like to take this opportunity to point out that this is <br> how Oracle myths get started and/or perpetuated.<br> <br> You may read a lot of things about Oracle that may no longer<br> be correct, or possibly never were correct.<br> <br> In this case, as Mark Powell has shown, this was at one time<br> true. Triggers were not compiled in Version 7 of Oracle.<br> <br> I don't recall which version changed that, but the point is this:<br> Oracle no longer works that way.<br> <br> A clear cut case where the manual should have been consulted.<br> <br> Not meaning to pick on anyone, just educate.<br> <br> Jared<br> <br> <br><div><span class="gmail_quote">On 6/29/05, <b class="gmail_sendername" >Guang Mei</b> <<a href="mailto:GMei@(protected)">GMei@(protected)</a>> wrote:</span ><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204 ); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I have read somewhere that when writing a trigger, one should not put all<br >the code in the trigger, instead one should create a store procedure and<br >call it from the trigger. Doing so would improve the performance, becuase <br>oracle will re-compile the trigger code everytime when a trigger is fired. <br>My question is if there is any paper/doc/study exist somewhere that compare <br>the performance. For a typical trigger with say about 20 lines of code, how <br>much improvement could one expect if putting the code into a procedure. I <br>guess I could do some test on the system by myself (too lazy), but wondering <br>if I can get some rough idea. I looked around on the web but can not find <br>any detailed paper out there.<br><br>Thanks.<br><br></blockquote></div><br>