Sql-server – How to handle deadlock issue sql server 2008

deadlocksql-server-2008

I have a simple application.This application update data of a table (B) from another table(A) which is changed every 60 sec. User may read data at any time so creating deadlock. How is this sort of problem solved in real world. Considering maximum 100 users how could I avoid deadlock. How would web application handling thousand of request avoid deadlock?

Edit:

Select Query : Select * from tableB
Update Query : update table tableB set tableB.someCOl = tableA.someCol where tableA.col1 = tableB.col3

enter image description here

Best Answer

The simplest way to reduce deadlocks - proper indexing. Make sure, that client's read requests not involving table/clustered index scans - if any - this is the open gates to deadlocks

And make sure, that your index has its allow_page_lock and allow_row_lock options ON