SQL Server Execution Plan - Displays Estimated and Actual rows. This article focuses on getting the information by looking at the actual query execution plan without drilling into operator properties.
Recently, I came across a few execution plans in SQL Server 2019, and it was something new.
Firstly, for each query plan operator, it lists the number of rows such as 18009 of 712 (2529%)
Similarly, the below execution plan shows 2181647 of 2181650 (99%)
Do you know what these figures are and what percentage is shown apart from the operator cost?
Well, it includes the following.
Estimated number of rows
The actual number of rows
For an optimized query plan, we all know that the actual number of rows should match the estimated number of rows. If you do not have updated statistics for your indexes, you might see a difference in these figures.
Therefore, the SQL server started showing the estimated and actual number of rows in the query plan. To understand displayed data, click on the operator and view its properties.
As shown below, we have an actual number of row 2181647 and an estimated number of rows 2181650.
Therefore, you can look at the execution plan and determine whether your statistics are out of date or not. If yes, you can use UPDATE STATISTICS to update statistics