0
假設我有兩臺運行在不同機器上的SQL Server數據庫,稱它們爲MachineA
和MachineB
。鏈接的服務器連接在哪裏執行計算?
如果我像執行哪裏,我們假設查詢上MachineA
運行以下
SELECT
[Store].[Name] AS [Store Name],
[Employee].[Name] AS [Employee Name],
SUM([Sale].[Amount]) AS [Total Sales]
FROM [MachineA].[DatabaseA].[dbo].[Sales] AS [Sale]
INNER JOIN [MachineB].[DatabaseB].[dbo].[Employees] AS [Employee]
ON [Sale].[EmployeeId] = [Employee].[EmployeeId]
INNER JOIN [MachineB].[DatabaseB].[dbo].[Stores] AS [Store]
ON [Employee].[StoreId] = [Store].[StoreId]
GROUP BY [Store].[Name], [Employee].[Name]
,在實際工作中執行哪裏查詢? MachineA
是否執行所有讀取並將行發送到MachineB
以獲得JOIN
ing?或者更復雜的事情發生在這裏?
檢查執行計劃並自己查看分析器。 –