This post has been moved to my new blog site. You can find it at the following link:
http://sqlblog.com/blogs/jonathan_kehayias/archive/2008/07/30/the-anatomy-of-a-deadlock.aspx
11 months ago
This blog has been moved to SQLBlog.com http://sqlblog.com/blogs/jonathan_kehayias/
Is there another way to handle this situation? I don't think many developers realize the potential problem you've described. And we can't always include other columns in our nonclustered index. There are simply too many columns and too many variations of SELECT.
ReplyDeleteCecil,
ReplyDeleteYou can always code the application to catch the 1205 Error that is returned by SQL Server, and resubmit the transaction. However, the easiest way to solve the problem is to have better control over your data access. When you say "There are simply too many columns and to many variations of SELECT." that is a red flag to me already. I would need to know a whole lot more about your specific scenario/database/application design to be able to provide any really usable comments on how to fix your problem.