Sample Header Ad - 728x90

Why is my Nested Loops join showing inaccurate row estimates in SQL Server?

2 votes
3 answers
673 views
I have the following execution plan: execution plan with inaccurate row estimates As you can see, the row estimates for the Clustered Index Scan and Index Seek operators are accurate. However, the Nested Loops join has a significant discrepancy: the actual row count is 6,420, while the estimated row count is only 72. My questions are: 1. How is the row count estimated for a Nested Loops join in SQL Server? 2. What factors could lead to such an inaccurate row estimate in this case? 3. Is there anything I can do to improve or correct the estimate? Thank you for any insights!
Asked by Tuyen Nguyen (343 rep)
Nov 6, 2024, 08:35 PM
Last activity: Nov 8, 2024, 09:28 AM