Why would Est vs Actual Rows in the left most Stream Aggregate operator become way off, when the previous operator does not.
The actual FROM and WHERE clause of this statement is as given below:
FROM dbo.adenrollsched(NOLOCK) WHERE adenrollsched.adenrollid IN ( SELECT adenrollid FROM adenroll(NOLOCK) INNER JOIN adprogramversion(NOLOCK) ON adprogramversion.adprogramversionid = adenroll.adprogramversionid WHERE adenroll.systudentid = ( SELECT systudentid FROM adenroll(NOLOCK) WHERE adenrollid = @adenrollid ) AND adprogramversion.sdf1 = ( SELECT adprogramversion.sdf1 FROM adenroll(NOLOCK) INNER JOIN adprogramversion(NOLOCK) ON adprogramversion.adprogramversionid = adenroll.adprogramversionid WHERE adenrollid = @adenrollid ) ) OR adenrollsched.adenrollschedid IN ( SELECT AdEnrollSchedOtherEnroll.adenrollschedid FROM dbo.AdEnrollSchedOtherEnroll WHERE adenrollid = @adenrollid ) AND EXISTS (SELECT 'true' from dbo.adcourse(NOLOCK) WHERE adenrollsched.adcourseid = adcourse.adcourseid AND AdCourse.Code NOT LIKE 'ORIENT%' )
The statistical nature of cardinality estimation means that two logically-identical subtrees can produce quite different estimations. In general, it is not possible to say which estimate is "better'. The final plan often consists of several such subtrees, with estimates derived in different ways.
I wrote about this in a little more detail recently as part of the following article:
That post is essentially a bug report, but the seemingly "impossible" cardinality estimates are not a bug – they are an expected consequence of the way the optimization process works.