June 28, 2011 at 1:14 am
There is triggers for insert, Update for a table. Is there any advantage in performance to create two different triggers (One for insert and one for update) over a single trigger combining both insert and update?
June 28, 2011 at 1:34 am
No performance gain. On the contrary, I think it could end up being a bit slower that way.
Whan I don't have a particular reason, I go for the single trigger.
-- Gianluca Sartori
June 28, 2011 at 1:34 am
There won't be performance addon by seperating Insert and Update trigger as both will run on initiation of specific action. If one transaction running the insert operation you cannot run the another transaction say Update unless and until first completes. Which means when insert happens insert trigger will run and when Update Update trigger will initiate.
Then why shoud we seperate this... if you are using some business logic to perform you can maintain it in different codes.
Abhijit - http://abhijitmore.wordpress.com
June 28, 2011 at 1:44 am
Thanks a lot
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply