Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
heze
Posting Yak Master
192 Posts |
Posted - 2008-12-27 : 21:19:30
|
Does somebody know if instead of triggers are a performance issue to the RDBS?I don't want to use them to update a view, I just want to use them to perform an action before the requested operation is executed and then perfoprm the actual requested operation.Also, do instead of triggers have any kind of inserted or deleted temporary tables? If the tempdb is not used in these kind of triggers, I would imagine that the performance degradation due to them is not an issue?Any thoughts?Thank you |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-12-28 : 09:54:10
|
quote: Originally posted by heze Does somebody know if instead of triggers are a performance issue to the RDBS?I don't want to use them to update a view, I just want to use them to perform an action before the requested operation is executed and then perfoprm the actual requested operation.Also, do instead of triggers have any kind of inserted or deleted temporary tables? If the tempdb is not used in these kind of triggers, I would imagine that the performance degradation due to them is not an issue?Any thoughts?Thank you
Triggers will always have some impact on performance although it depends on what has been coded by the developer inside the trigger. An empty trigger will have un-noticeable performance impact.INSTEAD OF triggers generate the same virtual tables as BEFORE triggers. Whether sql server choses to use tempdb or not will have much less bearing on performance than whatever you are planning to do inside the trigger. What are you planning on using this trigger for?If you want to perform the user action after your custom code then why use an INSTEAD OF trigger rather than a BEFORE trigger. Be One with the OptimizerTG |
 |
|
heze
Posting Yak Master
192 Posts |
Posted - 2008-12-28 : 12:30:31
|
>If you want to perform the user action after your custom code then why use an INSTEAD OF trigger rather than a BEFORE triggerbecause I thought that the INSTEAD OF trigger did not go through the overhead of generating the "virtual tables". I want to get the signal that causes the trigger to execute to perform actions like:-notifying another process that something is about to happen (read about Notification Services, but there,the notification occurs after the event occurs, this is not useful for me, I want to send a notification message/signal before the operation is performed)-I am also trying to figure out a way to create a SELECT trigger thank you |
 |
|
X002548
Not Just a Number
15586 Posts |
|
heze
Posting Yak Master
192 Posts |
Posted - 2008-12-28 : 22:57:43
|
X002548,The fault is mine, I probably didn't structure my questions in a clear way and you probably misunderstood me, I appologize. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-29 : 00:46:43
|
quote: Originally posted by heze >If you want to perform the user action after your custom code then why use an INSTEAD OF trigger rather than a BEFORE triggerbecause I thought that the INSTEAD OF trigger did not go through the overhead of generating the "virtual tables". I want to get the signal that causes the trigger to execute to perform actions like:-notifying another process that something is about to happen (read about Notification Services, but there,the notification occurs after the event occurs, this is not useful for me, I want to send a notification message/signal before the operation is performed)-I am also trying to figure out a way to create a SELECT trigger thank you
what do you mean by select trigger? |
 |
|
|
|
|
|
|