SQL Server, the Row Count Spool (explained in a simple way)
Hi guys, Welcome back friends! Last posts were dedicated to the spool operators, we have seen table spool, eager spool, lazy spool and window spool. Today is the moment of the Row count Spool. Do you want to know everything about this type of Spool operator? then you just have to read .. The Row Count Spool What is the Row Count Spool ? It is simply one of the four spool operators supported by SQL server. It counts the number of rows that receive in input and return these rows when needed . This type of spool therefore behaves with a Table Spool but it is optimized for cases where the only relevant information is the number of rows and the content of the rows is not. How does SQL Server implement such behavior? Through a simple but smart idea! The data, that are read only to obtain the cardinality, are not saved. Note that since the operator does not store its own input, no working table is created in the tempdb. This operator simply returns the same number of r...