KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The following query takes forever to finish. But if I remove the top 10 clause, it finishs rather quickly. big_table_1 and big_table_2 are 2 tables with 10^5 records. I used to believe that top clause will reduce the time cost, but it's apparently not here. Why??? select top 10 ServiceRequestID from ( (select * from big_table_1 where big_table_1.StatusId=2 ) cap1 inner join big_table_2 cap2 on cap1.ServiceRequestID = cap2.CustomerReferenceNumber )
Tags (comma-separated)
Save Edits
Cancel