Row Count Spool

Optimizing SQL Database Performance

Optimizing Database Performance

Row Count Spool

The Row Count Spool physical operator scans the input, counting how many rows are present and returning that many rows without any data in them. This operator is used when it is important to check for the existence of rows rather than the data contained in the rows. For example, if a Nested Loops operator performs a left semi join operation and the join predicate applies to inner input, a row count spool may be placed at the top of the inner input of the Nested Loops operator. Then the Nested Loops operator can look at how many rows are output by the row count spool (because the actual data from the inner side is not needed) to determine whether to return the outer row.

See Also

Left Semi Join

Nested Loops