Hi,
I have a question.
Suppose two "Insert" or "update" instructions are run on the same table ..(in case of "Update" same row ...column).. at the same time....
can the two operations run at the same time on dual core/ quad core processors?
What is the role of dual/quad cores in such case..?
Since these processors can run two or four threads simultaneously... how will the sql server execute the two instructions ie (parallel or interleaved).
Or the Insert , Update or Delete instructions are run one after another just using "interleaving"?
I hope that you understand what i am asking...!
or i just confused you.
With regards,
Girish Pawar
I thinking you're misunderstanding parellelism versus sql transaction. When you start a transaction, the system can use 1 or more thread to perform the work. Depending on the what resource (rows, pages, or table) get locked the second transaction will have to wait until the first transaction release the lock. This works the same whether the system has 1 or more core.|||what if i say ... WITH NO LOCK
on my stored procedure..?
Are all the commands in sql server executed in a queue...?
so that the machine being multicore has no affect what so ever?
|||
At very very low level it is not possible, all the actions in sql server is a log based. Which ever first open the log file will write the contents there. There is a very minimal lock should be there for any actions.
Note:
If you try with date value to verify this action you may get wrong info.
Check this thread for more details.. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1630363&SiteID=1
No comments:
Post a Comment