A single column updation | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

A single column updation

Hi, I have a table in which a specific column should be updated with a value which is generated from another table.(by counting number of accounts). I used a stored procedure to update , but it is not success since the table contains large no of records, and the updation resulting with the message ‘Timeout expires’. Please advice me on the alternative method to use.
prompt reply is appreciated.
Check the execution plan for that UPDATE query and if possible UPDATE STATS on the table for better performance and also recompile the Stored procedure. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
If nothing helps as Satya suggested, can you try increasing remote query timeout from 600 sec to 3600 sec and see if that works? HTH
-Rajeev Lahoty
I would first try simpler solutions like satya’s sugesstions, improving index design or optimizing update query. If it doesn’t help, I’ll try to redesign the process. You can try either: 1. to update count column value each time account is added/deleted.
2. to update number of accounts based just on changes (account creations, deletions) from the last update execution. To apply this solution you would have to include some control/log tables and add CreatedDate column in account table if not already present.
Moved to General DBA Questions. Luis Martin
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.