开发者

SQL Server not running queries on remote (Linked MySQL) server

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.

Ho开发者_开发技巧w can we push these to the MySQL server instead?

Thanks

James


If you write your queries like this ...

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

the joins/filters should happen remotely.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜