Home All Groups Group Topic Archive Search About
Author
18 Aug 2006 3:09 PM
Shahriar
I am hoping that somebody could point me to a right direction for this
question.

In a heavily used website, we are getting occasional timeouts accessing
tables.  Could the casue be due to not having the "nolock" phrase in some of
our very complex select statements?  Could someone point me to some articles
regarding this or some feedback. 

Many thanks.

Author
18 Aug 2006 3:43 PM
Tracy McKibben
Shahriar wrote:
> I am hoping that somebody could point me to a right direction for this
> question.
>
> In a heavily used website, we are getting occasional timeouts accessing
> tables.  Could the casue be due to not having the "nolock" phrase in some of
> our very complex select statements?  Could someone point me to some articles
> regarding this or some feedback. 
>
> Many thanks.
>

Using NOLOCK would be a bit of a band-aid solution, and would expose you
to the risk of reading "dirty" data.  You are probably experience
blocking or other resource contention, which is usually caused by
inefficient queries or missing indexes.

Your first step should be to use Profiler to identify the queries that
are causing the most load on your server.  Start with the heaviest
query, look for missing indexes, or opportunities to rewrite the query
more efficiently.  This will help to eliminate table or index scans,
which contribute to excessive blocking, which contributes to poor
overall performance, timeouts, etc...


--
Tracy McKibben
MCDBA
http://www.realsqlguy.com

AddThis Social Bookmark Button