June 26, 2015 at 3:15 am
Hi Folks,
how can i explain my Boss that triggers are evil und only usefull for auditing purposes.
He wants me to use a DML trigger to keep for example the sum and rowcount of orderpositions in the order-row.
Would you recommend this?
It's a heavy-used VLDB ...
Greetz and thanks in advance
Query Sheppard
Greetz
Query Shepherd
June 26, 2015 at 3:28 am
I don't think that triggers are evil(full stop), they become evil when written by the wrong people, in the wrong manner and for the wrong reasons.
Your task here is to show him why they can be evil (if thats what you feel), as someone that is able to write triggers you should be able to know (or test) roughly what impact will it have on the eniviroment but also you need some alternatives to propose.
June 26, 2015 at 3:42 am
Query Shepherd (6/26/2015)
how can i explain my Boss that triggers are evil und only usefull for auditing purposes.
Since they're not automatically evil and are useful for a lot more than auditing, maybe don't?
Badly written triggers are a problem. Large numbers of triggers on a table can be a problem. Complex triggers can be a problem. Triggers however aren't automatically a problem. As long as you keep them short, make sure they're written well, handle multiple rows correctly and are documented, they should be fine.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply