SQL SERVER – Optimize Key Lookup by Creating Index with Include Columns

I love query tuning and performance tuning projects. In one of the recent Comprehensive Database Performance Health Check my client had a very interesting scenario where their queries were running pretty fast earlier but gradually started to run slow and eventually started to take over 10 minutes to execute. They reached out to me to tune their slow running query. While looking at the query execution plan, there is a big key lookup operation which was actually slowing down their query. I decided to create an index with include column on that table and resolve this issue.

Read More

SQL SERVER- High CPU and Transaction Type WorkFileGroup_fake_worktable and Workfile

As a part of my  SQL Server Performance Tuning and Optimization consultancy, I face interesting situations and every time I am able to resolve them. This was one of the more interesting ones where I was not getting any hint from the internet. Since it was a new thing to me, I am sharing it via this blog. In this blog, we would learn about the cause of WorkFileGroup_fake_worktable and Workfile.

Read More

SQL SERVER – Performance Comparison IN vs OR

Some questions never get old and some question and I believe we will be discussing them for many more years in the future. Just other days, I received this question during my SQL Server Performance Tuning Practical Workshop. The question was about Performance Comparison IN vs OR. Though personally, I have answered this question quite a many times before, let us answer it once again, it never hurts to repeat the truth multiple times.

Read More