SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Silicon Investor, under the hood

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Green Receipt who wrote (50)2/3/2005 11:59:02 PM
From: SI Dave   of 81
 
Select * from table with(nolock) does no locking and does not respect other locks. The possible consequences are "dirty" reads of uncommitted records, partially completed transactions, etc. The vast majority of the back-end stuff that I'm writing is extraction queries (reports), not updates or inserts, so a dirty read here and there isn't of any consequence.

I have one that's a long list of selects with a lot of counting rows from many large tables based on various criteria, and it went from minutes to seconds when I changed everything to "with(nolock)" - and the deadlocks disappeared too. :-)

Unrelated, something I have been making use of extensively which was first made available in SQL Server 2000 are in-line user defined functions, which can be fully parameterized unlike in-line views or select queries. How on earth SQL developers managed without those defines my comprehension.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext