Potentially leading to less efficient implementations or missed opportunities for optimization. In this blog post, we’ll explore three such Overutilized features.
SQL SERVER – Convert Cursor to Set Based Insert
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).
Performance Tuning Mistakes in SQL Server: 11 Habits to Fix
Performance tuning mistakes are habits, and each one has a check. Eleven sit in one table, and five are measured on a demo database: a missing index, stale statistics, a row by row loop, a giant delete and a type that cannot be indexed.
NOCOUNT Performance: What SET NOCOUNT ON Saves in a Loop
NOCOUNT performance depends on the messages that SQL Server no longer sends to the client. This post counts the network packets of a procedure with a 5,000 step loop, with the setting off and on. It also explains why some tests show no time gain, and where the setting helps most.
Drop Tables by Prefix in SQL Server and Azure SQL Database
To drop tables by prefix, list the matching tables first and drop them with a script that quotes every schema and table name. This post shows why the underscore in a prefix is a trap, a one-statement version and a cursor version. It works in SQL Server and in Azure SQL Database.
SQL SERVER – Reviewing Sleeping Sessions Before Terminating Any Session
An inactive or sleeping session may still be a useful pooled connection. A customer case prompted my earlier session-cleanup script.







