If you ever wondered why a query that looks harmless is performing poorly despite having indexes in place, the answer could lie in a subtle performance pitfall—non-SARGable queries. These sneaky queries can silently bypass your indexes, leading to slow scans instead of efficient seeks. Let me share my recent example while helping my client with […]
SQL SERVER Performance Tuning: Catching Key Lookup in Action
If you’ve ever run a SQL query that looks simple but takes longer than expected, one likely culprit is the Key Lookup. This often-overlooked operation can quietly slow things down—especially when you’re dealing with large datasets and high-frequency queries. In this blog post, we’ll explore what a Key Lookup is, how to spot it, and […]
ANSI PADDING and Storage – SQL in Sixty Seconds 210
ANSI PADDING is an often-overlooked yet impactful setting in SQL Server that determines how trailing spaces are handled in CHAR and VARCHAR columns. By default, ANSI_PADDING is ON, and it plays a significant role in data storage and consistency. In this post, we’ll explore what ANSI_PADDING does, why it matters, and how it affects your […]
SSMS and Execution Timeout – SQL in Sixty Seconds 209
Execution timeout in SSMS are a small but important feature that can help you manage query performance. By default, SSMS allows queries to run indefinitely, but there are times when limiting execution time can prevent issues in both testing and production environments. In this post, we’ll explore why and how to adjust execution timeouts and […]
Performance and TempDB Spills – SQL in Sixty Seconds 208
Sorting large datasets in SQL Server can significantly impact performance, especially when it leads to tempdb spills. This post explores why this happens, how to identify it, and some quick tips to optimize your queries. What Causes TempDB Spills? Tempdb spills occur when SQL Server does not allocate enough memory for operations like sorting. The […]