Row Count Spool problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Row Count Spool problem

Hi, I have a stored procedure involving a Heterogeneous Query. A Linked Server is added to retrieve values from Active Directory Service. During tuning of the query and understanding the query execution plan.. I had observed a stmt "Row Count Spool". On further exploration for the cause of Row Count Spool, my observation has been inferred to a Join Problem. Can any body tell me if i am right in my inference and let me ne solution for troubleshooting the Row Count Spool as it is a temporary table reference.? Thanks in Advance. RoyalSher.
The world is the great gymnasium where we come to make ourselves strong.
Here’s a tip from the website that may prove useful to you:
Sometimes, the Query Optimizer will need to create a temporary worktable in the tempdb database. If this is the case, it will be indicated in the graphical query execution plan with an icon labeled like this: Index Spool, Row Count Spool, or Table Spool. Anytime that a worktable is used, performance is generally hurt because of the extra I/O generated when maintaining a worktable. Ideally, there should be no worktables. Unfortunately, they cannot always be avoided. And sometimes their use can actually boost performance because using a worktable is more efficient that the alternatives. In any event, the use of a worktable in a graphical query execution plan should raise an alert with you. Take a careful look at such a query and see if there is anyway it can be rewritten to avoid the work table. There may not be. But if there is, you are one step closer to boosting the performance of the query. [7.0, 2000] Added 8-15-2002
A join problem can potentially cause a Row Count Spool to occur in the execution plan. You may need to experiment a little bit with the query to see what you can do to improve it. —————————–
Brad M. McGehee, MVP