Total Amount of Triggers Per Table
Hi
Just a quick question taht I hope someone can answer, What it the total amount of trigger per table?
I understand that it is better to have as least as possible for performance
Thanks Rich
Hi
Just a quick question taht I hope someone can answer, What it the total amount of trigger per table?
I understand that it is better to have as least as possible for performance
Thanks Rich
HTH, Jens Suessmeyer.
You can only have one each of INSTEAD OF triggers for insert, update and/or delete. And as many AFTER triggers as you need.
I understand that it is better to have as least as possible for performance
Performance shouldn't enter into it, really. You should have as many triggers as you need to validate your data safely. It is far faster to enter bad data than it is to validate the data, but it is far faster in the future to use clean, validated, trustable data (I have been working on ETL lately with less than pristine data :)
If you are writing the triggers, I would suggest that having only one AFTER trigger per action (INSERT, UPDATE, and DELETE as needed) is far easier to manage than having one that does all actions and just having one per action is far easier than having multiple triggers per action. So when I own the triggers, I usually only have one trigger per action so I can manage what happens first, what to do on errors, etc.
Only one INSTEAD OF per operation but "unlimited" of non INSTEAD of.
HTH, Jens Suessmeyer.