Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 [LinkedServer] Infinity query.

Author  Topic 

ais
Starting Member

2 Posts

Posted - 2009-02-09 : 05:52:06
I have SqlServer 2005 with table1 300 rows
and LinkedServer
SqlServer 2000 with table2 300000 rows
If I execute query
quote:
select * from table1 as t1
left join table2 as t2 on ...

in Management Studio, I get only first 170 rows and then query is executing indefinitely.

ais
Starting Member

2 Posts

Posted - 2009-02-09 : 06:25:35
Or maybe someone is acquainted with this behaviour.
select top n * from ...
n _____ time(sec)
1-175 _ 5
176 ___ 35
177 ___ Inf
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2009-02-09 : 07:31:51
Maybe a broken index / data corruption?

Have you rebuilt indexes recent'y or done a checkdb?

SELECT TOP doesn't mean anything unless you specify an order by


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-09 : 12:37:31
Did you check blocking/Locking? What exact query you used for Linked Server?
Go to Top of Page

saurabhsrivastava
Posting Yak Master

216 Posts

Posted - 2009-02-09 : 16:40:54
" I get only first 170 rows and then query is executing indefinitely."
1) How long did you wait before cancelling the query?
2) Try to run same scenario from SQL 2000. See if u can fetch 300 rows from SQl 2005 server.
Go to Top of Page
   

- Advertisement -