In this blog post, we will focus on the issue of cursor-based inserts and demonstrate how to convert them into set based operations.
SQL SERVER – Replacing a Cursor with a Common Table Expression
Let us learn today – How I was able to improve the query performance by replacing the cursor with a common table expression (CTE).
SQL SERVER Heaps: Understanding Their Benefits and Limitations
In this article, we will delve into the use cases for SQL Server heaps, scenarios where caution should be exercised, and effective management techniques.
11 Essential Tips for Avoiding Common SQL Server Performance Tuning Mistakes
This blog post will cover 11 tips for avoiding common SQL server mistakes. From indexing to security, these tips will help you optimize your database’s performance.
SQL SERVER – SET NOCOUNT – Impact on Stored Procedure Performance
Recently, I solved a huge performance problem for one of my clients by just adding the SET NOCOUNT inside the stored procedure.
SQL SERVER – Script to Kill All Inactive Sessions – Kill Sleeping Sessions from sp_who2
I consider myself fortunate that I get to work with so many different clients while engaged in Comprehensive Database Performance Health Check. Recently we found out that one of the third party application for the client is not closing the connections which they open after completing the transactions. This was negatively affecting their performance. We immediately opened the ticket with the third party application and while they provide the solution after patching the application we decided to kill all the inactive sessions.
SQL SERVER – How to Kill All the Processes for Any Database?
Recently during Comprehensive Database Performance Health Check, to test our unique fix, we had to run a stress test on my customer’s development environment. Once we were done testing our script, we did not need our stress test queries to run on our server. Even though we stopped to run the batch file with stress test queries, there were few long-running queries kept on running on the server. This brought us to a very interesting point where we had to kill all the processes for one particular database.