Properties of Iterators

In this post, I’ll give an overview of three interesting properties of iterators that can affect query performance: memory, non-blocking vs. blocking, and dynamic cursor support. Memory All iterators require some small fixed amount of memory to store state, perform calculations, and so forth.  We do not track this fixed memory or try to reserve…

6

Viewing Query Plans

In my last post, I explained that SQL Server executes a query by compiling it into an iterator tree which we call a query plan.  So, if we want to understand iterators and query execution better, we need a way to look at query plans.  Fortunately, SQL Server makes it easy to do exactly that…

4

The Building Blocks of Query Execution

What are iterators? SQL Server breaks queries down into a set of fundamental building blocks that we call operators or iterators.  Each iterator implements a single basic operation such as scanning data from a table, updating data in a table, filtering or aggregating data, or joining two data sets.  In all, there are a few…

3

Why am I starting this blog?

About two years ago I presented a talk to a couple of SQL Server user groups where I explained in general terms how SQL Server executes queries.  I explained how to read showplan and how some of the most common operators (such as index scans and seeks, joins, and aggregation) actually work.  I received a…

5