Implementing a Common MS SQL Server Performance Indicator
Introduction There is often a need to create a performance indicator that would show database...
Missing Indexes in MS SQL or Optimization in no Time
When executing a query, the SQL Server optimizer tries to find the best query plan based on existing indexes and available latest...
Performance of Table Variables in SQL Server
In this article, we are going to touch upon the topic of performance of table variables. In SQL Server, we can create variables that will...
Query Optimization in PostgreSQL. EXPLAIN Basics – Part 3
I continue a series of articles on the basics of EXPLAIN in PostgreSQL, which is a short review of...
Query Optimization in PostgreSQL. EXPLAIN Basics – Part 2
In my previous article, we started to describe the basics of the EXPLAIN command and analyzed what happens in PostgreSQL when executing a...
Query Optimization in PostgreSQL. EXPLAIN Basics – Part 1
Why does it take so much time to execute a query? Why are there no indexes? Chances are you’ve heard about EXPLAIN in PostgreSQL....
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...
What Can Query Plan Tell?
Introduction SQL query describes the expected result, not the way to get the result. The set of specific steps the server must take to...
Optimizing Overlapping Queries Part 1: Introduction & Enhanced T-SQL Solution
Databases that serve business applications should often support temporal data. For example, suppose...