The Parallelism Operator (aka Exchange)

As I noted in my Introduction to Parallel Query Execution post, the parallelism (or exchange) iterator actually implements parallelism in query execution.  The optimizer places exchanges at the boundaries between threads; the exchange moves the rows between the threads. The iterator that’s really two iterators The exchange iterator is unique in that it is really…

3

Index Union

I was planning to continue writing about parallelism this week (and I will continue another time in another post), but I received an interesting question and chose to write about it instead. Let’s begin by considering the following query: create table T (a int, b int, c int, x char(200)) create unique clustered index Ta…

0

Introduction to Parallel Query Execution

SQL Server has the ability to execute queries using multiple CPUs simultaneously.  We refer to this capability as parallel query execution.  Parallel query execution can be used to reduce the response time of (i.e., speed up) a large query.  It can also be used to a run a bigger query (one that processes more data)…

5

Decorrelating Subqueries

In my previous post, we saw some examples where the optimizer is able to take a query with a correlated subquery and rewrite it as a join.  For instance, we saw how this simple “in” subquery: create table T1 (a int, b int) create table T2 (a int, b int, c int)   select *…

1