|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, April 30, 2013 5:59 AM
Points: 1,075,
Visits: 5,114
|
|
Will converting adhoc queris to stored procedures reduce deadlocks?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:48 AM
Points: 37,635,
Visits: 29,886
|
|
Just converting them to stored procs, probably not.
To fix deadlocks, you need to identify the cause of that deadlock and fix that. It's probably bad code, bad indexes or both
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 1:50 AM
Points: 420,
Visits: 10,963
|
|
I would agree, straight conversion from Query to Stored Proc would not stop dead lock.
Rather get the queries working right then convert them to a stored procedure.
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Friday, March 22, 2013 1:27 AM
Points: 568,
Visits: 494
|
|
| yes this will not stop deadlocks on its own there are a number of things you must do, look at the table and how they are set-up the code you can commit trans before starting a new one this will also help. there are many ways to reduce dead locks one of the ways is to use row level locking, however, as they will always be a part of life the best way is to identify the underling in application causes and make the appropriate changes to that.
|
|
|
|