June 21, 2004 at 5:36 am
Hello All,
I am experiencing an issue with a Linked Server query which I don't quite understand. The Linked Server is in SQL Server 7 and is being queried from a SQL Server 2000 box.
Here is the query...
SELECT SDDCO, SDDCT
FROM <SERVER>.<DB>.dbo.SalesHist
WHERE SDDCO = 5000129 AND SDDCT = 'RI'
The table contains approximately 2.5 million rows. If I run the query on the local box, the row is returned instantly, which is what I expect.
Now for the fun part. When I run this query above, it completes in about 1m 30 seconds. If I execute the query using only WHERE SDDCO = 5000129 then it completes instantly.
Also, if I use SELECT * and run the statement with both clauses in the WHERE, it executes for some 15 minutes without anything being returned.
Any idea's as to what the issue could be. The SalesHist table has 21 columns.
Cheers,
Clive
June 21, 2004 at 6:35 am
hi,
try to set "Use Remote Collation" property of your linked server.
vbenus
June 21, 2004 at 6:51 am
Nice one...That worked!
Thanks,
Clive
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply