We have a linked server and everything works fine, except whenever I need to run a delete or insert command the process is terribly slow. We have a T1 connection between the two sites and it only deletes around 100 records, which seems like it shouldn't take 15 minutes to run, but it does.
I issue the DELETE command like this:
(LOFTHOUSESQL2 being the linked server)
DELETE LOFTHOUSESQL2.QueryTrx.dbo.SO_90_UDF_Sales_Order
FROM LOFTHOUSESQL2.QueryTrx.dbo.SO_90_UDF_Sales_Order t1, #temp t2
WHERE t1.SalesOrderNumber = t2.SalesOrderNumber
I've read that this can also be done using the OPENQUERY command, which helps the speed, but I cannot find any documentation on using the DELETE or INSERT command while using OPENQUERY.
So basically I guess what I'm asking is, does the OPENQUERY command improve the speed (if so anyone have some sample delete and insert syntax) or is there another way to improve the speed?
thanks for any insight.
I issue the DELETE command like this:
(LOFTHOUSESQL2 being the linked server)
DELETE LOFTHOUSESQL2.QueryTrx.dbo.SO_90_UDF_Sales_Order
FROM LOFTHOUSESQL2.QueryTrx.dbo.SO_90_UDF_Sales_Order t1, #temp t2
WHERE t1.SalesOrderNumber = t2.SalesOrderNumber
I've read that this can also be done using the OPENQUERY command, which helps the speed, but I cannot find any documentation on using the DELETE or INSERT command while using OPENQUERY.
So basically I guess what I'm asking is, does the OPENQUERY command improve the speed (if so anyone have some sample delete and insert syntax) or is there another way to improve the speed?
thanks for any insight.