Reg Concurrent execution of Procedure.. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Reg Concurrent execution of Procedure..

How can i execute a procedure concurrently without deadlocks.
I have used all table hints and indexes appropriately as per my knowledge..
And when i execute a procedure concurrently it results in Blocks..(meaning it runs
indefinitely and when i look for sp_who my transaction is getting blocked..WHy it is getting blocked..Also if i run it for 4 users it is getting sequentially esxecuted (meaning one process gets over after the other..) i need to run them in parallel..
Is there any concept of horizontally partitioning the data so that i can avoid such issues..
Are you able to post your stored procedure? How large and complex is it?<br /><br />There should be a way to achieve what you want…<br /><br />although if you have an update/delete/insert statement near the top of the procedure then you may find other procedures get blocked until the first one commits. Choices then are to:<br />- have commits within the procedure (and thus lose the ability to roll the whole procedure back)<br />- attempt to spread the update/delete/insert using a clustered index on columns which force rows to be in different parts of the table<br /><br />Hard to give clear guidance without knowing in more detail what the code is doing <img src=’/community/emoticons/emotion-5.gif’ alt=’;-)’ /><br /><br />Cheers<br />Twan
]]>