Why Multiple JOINs are bad for Query or Do Not Get in the Way of Optimizer
Recently, I came across an application that generated DB queries. I understand that there is...
USE HINT and DISABLE_OPTIMIZED_NESTED_LOOP
One of the available algorithms to join two tables together in SQL Server is Nested Loops. The nested loops join uses one join input as the...
Optimizing Overlapping Queries Part 1: Introduction & Enhanced T-SQL Solution
Databases that serve business applications should often support temporal data. For example, suppose a contract with a supplier is valid for...
Implementing SQL Server Performance Indicator for Queries, Stored Procedures and Triggers
Preface Sooner or later, a DB administrator would like to have a performance indicator for SQL...
XML performance tips
Parsing data from XML using XQuery is a routine practice. In order to do this most effectively, little effort is required. Suppose we need...
Foreach or For – That is the Question
The discussion about the preference difference between FOREACH and FOR is not new. We all know that FOREACH is slower, but not all know...
Query Performance Insight: Discovering What Consumes Resources of Your Azure SQL Database?
In this post, I’d like to take a brief look at the Query Performance Insight — SQL Azure tool...