Introduction to Partitioned Tables

In this post, I’m going to take a look at how query plans involving partitioned tables work.  Note that there is a big difference between partitioned tables (available only in SQL Server 2005) and partitioned views (available both in SQL Server 2000 and in SQL Server 2005).  I will look at the query plans for…

5

Parallel Hash Join

SQL Server uses one of two different strategies to parallelize a hash join.  The more common strategy uses hash partitioning.  In some cases, we use broadcast partitioning; this strategy is often called a “broadcast hash join.” Hash Partitioning The more common strategy for parallelizing a hash join involves distributing the build rows (i.e., the rows…

6

Parallel Nested Loops Join

SQL Server parallelizes a nested loops join by distributing the outer rows (i.e., the rows from the first input) randomly among the nested loops threads.  For example, if we have two threads running a nested loops join, we send about half of the rows to each thread.  Each thread then runs the inner side (i.e.,…

6

Parallel Scan

In this post, I’m going to take a look at how SQL Server parallelizes scans.  The scan operator is one of the few operators that is parallel “aware.”  Most operators neither need to know nor care whether they are executing in parallel; the scan is an exception. How does parallel scan work? The threads that…

3