Thursday 12 April 2012

Is Trigger is a Bad performer.



I am reading some well-known article related to trigger. Someone told that he is not using trigger in his whole life of development. 
Someone told that the trigger is a bad performer etc..etc.

One of my friends also told me, why you use trigger. Use the stored procedure for good performance.

What they are taking about? Is it true?

Here I am just sharing my views with my readers with my limited knowledge in Database performance.

As my thought, nothing can take the place of trigger.

When the complexity arises it helps us to get the desired solutions. So the trigger is good but we should keep something in mind before making logic within triggers.

Triggers are not slow itself. The bad logic that we wrote inside the trigger makes it slow. For example using cursors, multi table travels within the trigger.  Triggers are compiled and don't returns any result set. Try to make the trigger as simple as possible.
The triggers maintain the referential interiority. Stored procedure is used to implement the business logic.

Hope you like it.


Posted by: MR. JOYDEEP DAS

No comments:

Post a Comment