I had an issue where I was getting a bad row count estimationI was inner joining from table A to table B ON A.StatusID = B.ID .ID being the PK on table B and a trusted foreign key constraint existed.Even though the join could be simplified out, the row estimation on the output of the join operator by ~50% of the input, even though the foreign key guranteed 100% of the rows would join successfully.The use of traceflag 2301 also fixed this 'error' and gave a one-to-one estimation, but the optimizer logic should be enhanced to bring this guarenteed relationship into the the 'base' logic.
Product Language
Category
Proposed Solution
Primary Benefit
Other Benefits
Virtualization