How can I optimize this?
SELECT *FROMOPENQUERY(ORDERINFO,'Select *
From globalCommerce.dbo.tblGlobalOrderItems with (NoLock)')
WHEREGlobalOrderID IN(SELECTDISTINCT GlobalOrderIDFROM #TmpOrdersTbl)
How can I optimize this?
SELECT *FROMOPENQUERY(ORDERINFO,'Select *
From globalCommerce.dbo.tblGlobalOrderItems with (NoLock)')
WHEREGlobalOrderID IN(SELECTDISTINCT GlobalOrderIDFROM #TmpOrdersTbl)