My opinion (based on what I reda) is that you obtain a speed boost(not a big one if the SP is a small one), because this way the SQL Server uses no locks!!!
The same thing you can obtain by simply issuing a
set transaction isolation level read uncommitted
at the begining of each SP you have......
but be carefull maybe in certain situation you need to use the locking mechanims, and by using NOLOCK you may introduce inconsistent data....
good luck,
xenon
Main Topics
Browse All Topics





by: adatheladPosted on 2003-06-03 at 04:09:41ID: 8637374
I would say that it wouldn't make a difference on temporary tables in stored procedures.
These temp tables are limited to the scope of that procedure so no other processes can interact with it...i.e. the stored proc that created it is the only process accessing it. Therefore other process will not be attempting to read or gain locks on the temp table.
Whereas in your original statement using standard tables, there is a probability that other process are using the table at the same time, which is why NOLOCK works in that scenario.
Cheers