![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Hi, It's greatly appreciated if you could give me some opinions on this problem. We are using SQL Server Standard Edition service pack 3, windows NT, 2 processors. I put an update trigger in one of our tables and it's causing a timed out when we trying to update the table with several records. For one record is no problem. The update trigger has lots of IF statements, inserts to different tables and so on. Does anyone has any idea how to resolve this problem. |
#2
| |||
| |||
|
|
Hi, It's greatly appreciated if you could give me some opinions on this problem. We are using SQL Server Standard Edition service pack 3, windows NT, 2 processors. I put an update trigger in one of our tables and it's causing a timed out when we trying to update the table with several records. For one record is no problem. The update trigger has lots of IF statements, inserts to different tables and so on. Does anyone has any idea how to resolve this problem. Thanks, -tt |
#3
| |||
| |||
|
|
[posted and mailed, please reply in public] TThai (tpthai (AT) pepco (DOT) com) writes: Hi, It's greatly appreciated if you could give me some opinions on this problem. We are using SQL Server Standard Edition service pack 3, windows NT, 2 processors. I put an update trigger in one of our tables and it's causing a timed out when we trying to update the table with several records. For one record is no problem. The update trigger has lots of IF statements, inserts to different tables and so on. Does anyone has any idea how to resolve this problem. The inserted/deleted tables are not the fastest in town. You may win quite a lot by doing this in your trigger: SELECT * INTO #inserted FROM inserted SELECT * INTO #deleted FROM deleted and then use the temp tables instead. There might of course be other issues with the UPDATE statements having bad query plans and all that. Also, if you update the table the trigger belongs to, be sure to check that the RECURSIVE_TRIGGERS is not on for the database. |
#4
| |||
| |||
|
|
Appreciated for the suggestion reqarding the virtual tables. It did make a big difference in processing time. However, my next problem is when i update tableA, it created 1000 entries per each record_link in tableB. I would like to only capture 100 records in tableB |
#5
| |||
| |||
|
|
I suggest you check the trigger execution plan with Query Analyzer. I likely reason for the performance problem is that you don't have useful indexes to support the trigger queries. -- Hope this helps. Dan Guzman SQL Server MVP ----------------------- SQL FAQ links (courtesy Neil Pike): http://www.ntfaq.com/Articles/Index....partmentID=800 http://www.sqlserverfaq.com http://www.mssqlserver.com/faq ----------------------- "TThai" <tpthai (AT) pepco (DOT) com> wrote in message news:7fedd9b2.0307241048.46ae74d8 (AT) posting (DOT) google.com... Hi, It's greatly appreciated if you could give me some opinions on this problem. We are using SQL Server Standard Edition service pack 3, windows NT, 2 processors. I put an update trigger in one of our tables and it's causing a timed out when we trying to update the table with several records. For one record is no problem. The update trigger has lots of IF statements, inserts to different tables and so on. Does anyone has any idea how to resolve this problem. Thanks, -tt |
![]() |
| Thread Tools | |
| Display Modes | |
| |