Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 With NoLock on all select queries

Author  Topic 

drsloat
Starting Member

45 Posts

Posted - 2007-06-07 : 15:32:48
I just got asked to go through all the select queries in our db and make sure they have the with NoLock option.

The movtivation is that we find a lot of waiting on locks is what’s slowing things down.

Should this raise any red flags? We do not have a lot (if any) extended transaction, so i wouldn't think dirty reads would be that much of a concern.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-06-07 : 15:46:06
Yes it should raise red flags! It doesn't matter how fast your transactions are occurring, dirty reads are going to happen. Do you understand what a dirty read is? Are your customers okay with this possibly invalid data?

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-06-07 : 16:53:29
We HAVE to use NOLOCKs in all our SELECTs. As Tara said, as long as you understand the consequences of dirty reads, you can use them.


Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -