Tbl_Hurdle_Test Only has 25 000 rows why in the actual plan does the Table contain over 400 mil rows

Hello Guys.

In the table Tbl_Hurdle_Test has only 25 000 rows but on executing the query according to actual execution plan there is over 400 mil rows in the table.

How can this be? I have checked statisic and statistics also indicate that there are only 25 000 rows in the table.

On estimated execution plan the table also only contains 25 000 rows.

Thanks for your help.

Regards, Leon.

avatar image By sleon 0 asked Apr 11 at 01:45 PM
more ▼
(comments are locked)
avatar image Aaron Bertrand ♦ Apr 11 at 07:41 PM

That number is an indictor of how many rows SQL Server needs to process, and doesn't necessarily mean that many rows can actually be returned. If you look closer at the expensive Table Scan operator, it shows that SQL Server thinks there are 25K rows in the table, but the optimizer has chosen a plan that, because of the nested loop, causes the scan to be executed 18,000 times. Curious to see what would happen if you added a clustered index to that heap, with a leading key of the measure ID.

10|10000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.

Follow this question

Topics:

x629
x443
x24

asked: Apr 11 at 01:45 PM

Seen: 50 times

Last Updated: Apr 11 at 07:41 PM