question

sakuraime avatar image
0 Votes"
sakuraime asked ErlandSommarskog commented

table scan operator

From the execution plan , I have got a operator call table scan .

it has

estimated number of executions : 1.0.....
estimated number of rows to be read: 45899 < which is the rows of the table
estimated number of rows for all execution : 58.
Estimated number of rows per executions: 57


so why estimated number of rows for all execution is not 45899 ?

125603-image.png







what means the table scan to be stopped at the row of 58 ?

sql-server-general
image.png (18.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered ErlandSommarskog commented

Hi @sakuraime,

Estimated Number of Rows to be Read

This is an estimate of the number of rows that will be read by the operator as it is scanning the heap. The difference between this property and the Estimated Number of Rows or Estimated Number of Rows Per Execution property represents the number of rows that is estimated to be read but not returned due to the Predicate property.

Estimated Number of Rows for All Executions

An estimation of how many rows the operator will return for all (estimated) executions combined.
This property is not actually included in the execution plan. Tools such as Management Studio (version 18.5 and higher) computed it by multiplying the Estimated Number of Rows to the Estimated Number of Executions.

Refer to the blog Table Scan.


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.


· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ok . So my concern whether it really have to READ ALL THE ROW each time ,given it has predicate or not .?


0 Votes 0 ·

Hi @sakuraime ,

A Predicate on a Table Scan does not reduce the amount of rows that is touched by the operator.

0 Votes 0 ·

ok . So my concern whether it really have to READ ALL THE ROW each time ,given it has predicate or not .?

It has to read the row to be able to evaluate the predicate...

0 Votes 0 ·

so how can I know the table scan able to evaluate the predicate until the last row ?

0 Votes 0 ·
Show more comments
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

It would have helped to see the full popup, but I guess that there is a predicate that filters out rows.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.