Why some queries run more than expected?

Obviously, sometimes your queries might run slower than usual or seem like they do not progress. Once we check the session requests, the result specifies the status is in RUNNING and the value of READS and WRITES are keep on increasing which makes us to decline the doubt of query hang assumption.

In this situation we usually extract the execution plan for evaluation and analysis purpose. If SQL Server has no execution plan for the specific request. then the next step is to check the SOS TASKS and SOS THREADS;

In this step the TASK might show RUNNING as in status but the assigned THREAD might not be looking healthy and good. The following figure is the screenshot from such THREAD.

The above result set shows that thread is encountered an exceptional runtime error with severity 16 which most probably occurred during ACCESS METHOD process; means the underlying codes which is responsible to retrieve data rows and perform computation has some runtime error. This thread supposed to be terminated or aborted by SOS but seems SOS missed this.

This might be an random issue which I personally suspect the virtualization cause this problem; to resolve this issue simply kill the session and run the query one more time.

Share This Story

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Share Your Comments

Inline Feedbacks
View all comments

About The Author

Search Articles


Follow Fard Solutions