SQL SERVER – DBCC CHECKDB Waiting for PREEMPTIVE_OS_DEVICEIOCONTROL

As you might already know that I am a SQL Server Performance Tuning Expert who also acts as a “on-demand consultant” for many organizations across the world who have performance tuning or any other issue related to SQL Server. Once I was working with one of my clients and their DBA asked a question. In this blog, we would learn about possible ways to handle a situation where DBCC CHECKDB is indefinitely waiting for PREEMPTIVE_OS_DEVICEIOCONTROL.

Read More

SQL SERVER – Query to Find the Longest Running Function – Function Elapsed Time

I love my job of SQL Server Performance Tuning and Optimization consultant as every single day I walk into the customer door (well, to be honest, it is actually virtual door of GoToMeeting), I face new challenges and learn new ways to tune SQL Server. In this blog post, we will discuss Query to Find the Longest Running Function.

Read More

Microsoft Dynamics CRM – Max Degree of Parallelism Settings and Slow Performance

My primary source of income for me is the Comprehensive Database Performance Health Check for any application using SQL Server. Recently, I was hired by a large organization which was struggling with the poor performance of their Microsoft Dynamics CRM. They had recently upgraded their SQL Server to the latest version of SQL Server and were facing slow queries, slow loading of the pages as well as white screens in the applications.

Read More

SQL SERVER – Applying NOLOCK to Every Single Table in Select Statement – SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

The other day, during SQL Server Performance Tuning Practical Workshop, I walked into a very interesting situation. While tuning a query we had a situation when we had to check if the query is locked during the execution of not. To test our theory out we had to put a nolock hint for every single table of the long query. However, it was no way possible to do so as the Stored Procedure was super huge and involved over 90 tables and 14 views in multiple SQL Statements. It was indeed a huge challenge for a developer team to modify that SP. If you ever face such situations, you should not stress out. There is a much simpler way to read uncommitted data.

Read More