I have a view (View A) that pulls in columns from a number of tables. It also pulls in a column from another view (View B) which gets its data from a Linked Server table.
Now, View B runs fine, pulling back 11,000 rows in about a second. View A also runs fine. However, if I INNER JOIN from View A to View B on a column that comes from the Linked Server, the entire query runs so slow it times out.
If I INNER JOIN from View A to View B on a column that does NOT come from the Linked Server, it runs fine.
So I traced the issue to joining on a column which resides on the Linked Server. I just have no idea how to fix it.
Can anyone give me any pointers?