0

For various horrible reasons, we've had to link SQL Server to a MySQL database using Linked Servers and an ODBC Data Source. The queries run fine, but looking at the query plans you can see that SQL Server is always doing a full table scan on the remote server - and then doing any joins/filtering at the SQL Server end.

How can we push these to the MySQL server instead?

Thanks

James

James Crowley
  • 3,911
  • 5
  • 36
  • 65

1 Answers1

0

If you write your queries like this ...

select * from openquery
 ( myLinkedServer
  ,'Select * from mySQLTables where complicated joins/filters')

the joins/filters should happen remotely.

cindi
  • 4,571
  • 8
  • 31
  • 38