Sql-server – SQL Server query with Linked Server running without Parallelism

performancequery-performancesql serversql-server-2016

I have a query that includes accessing a table via linked server. When it runs it's doing so without parallelism. But if I comment out the join to the linked server table it runs with parallelism and completes almost instantly.

The row count of the table accessed by the linked server is 2m.

Could the linked server be causing the query to run without parallelism?

Here is the plan.

Best Answer

Joining to a table via a Linked Server is problematic. You can workaround the issue by pulling the required rows from the remote table into a local #temp table, and JOINing against that #temp table instead.