Though I mainly focus on SQL Server Performance Tuning as my primary consulting engagement, there are moments when I am asked questions from my regular clients which are not related to SQL Server Performance and they still expect me to answer. I think it is totally fair, no one wants to go to find a new consultant for some simple questions. Recently my customer wanted to know who dropped the database table from their primary database.
SQL SERVER – Results of Dynamic SQL Into A Variable
The other day during Comprehensive Database Performance Health Check, I was asked if there is a way to store results of dynamic SQL into a variable. This is a very popular question and let us see the answer to this question in this blog post.
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.
SQL SERVER – How to Escape a Single Quote in SQL Server?
In my earlier post on “How to Escape a Single Quote in SQL Server? – Interview Question of the Week #192 I showed you a method of escaping a single quote.
SQL SERVER – The Older Way to Find Size of Index Using Deprecated sysindexes
Earlier this month, I wrote a blog post about How to Find Size of the Index for Tables? – Interview Question of the Week #198, in this I had explained the way to find the size of the index for the table. However, while I was writing the blog post, I was thinking about how I used to love sysindexes once upon a time. However, as now I focus on the new DMVs, I decided not to provide the script of the sysindexes.




