Home Dashboard Directory Help

Incorrect row estimates when using views over linked servers by Paul McLoughlin


 as Won't Fix Help for as Won't Fix

Sign in
to vote
Type: Bug
ID: 773286
Opened: 12/3/2012 7:24:57 AM
Access Restriction: Public
User(s) can reproduce this bug


When querying a view over a linked server, the row estimates are incorrect and set to be 10,000 rows. The credentials used for the linked server make no difference. This can lead to inefficient execution plans.

This is using SQL Server 2012, SP1.

A reproduction script is included in the details below.
Sign in to post a comment.
Posted by SAinCA on 4/30/2013 at 10:38 AM
I, too, would appreciate an explanation.

We are FORCED into querying a View into our Customer's data over a Linked Server. We have absolutely no say in it, so to be hamstrung, yet again, by the seemingly more deficient as the days go by "optimizer", begs the question, "Why?"

Having lowered the permissions threshold in SQL2012 for seeing statistics over a Linked Server, one would have thought that now "seeing clearly" the optimizer would have no issues at all computing accurate estimates, or did I miss something...?
Posted by Paul McLoughlin on 2/26/2013 at 4:29 PM
It would be useful to know why this issue won't be fixed if possible. Is the recommendation that people do not use views when dealing with linked servers? If so then it would be valuable if the documentation stated this. At a minimum having the documentation updated so that it was clear that this issue existed would be helpful.
Sign in to post a workaround.