Hi guys.
Got a weird one I'm trying to work out...
Selecting top N from a view which has thousands of applicable records.
If I top 700 I get results in 4 seconds, if I top 750+ they never return - So I can't even get a query plan back to see what's different between the 2.
My "where" clause allows me to step up through 1000's upon 1000's of rows so it's not like I'm running out of records and forcing it to scan tables either.
Any ideas? Been at it all day and nothing really useful on Top N Queries comes back.
Using a Set Rowcount is even worse as it forces the whole result set to be loaded before sorting (In this case, it also never comes back).
Thanks!!
Got a weird one I'm trying to work out...
Selecting top N from a view which has thousands of applicable records.
If I top 700 I get results in 4 seconds, if I top 750+ they never return - So I can't even get a query plan back to see what's different between the 2.
My "where" clause allows me to step up through 1000's upon 1000's of rows so it's not like I'm running out of records and forcing it to scan tables either.
Any ideas? Been at it all day and nothing really useful on Top N Queries comes back.
Using a Set Rowcount is even worse as it forces the whole result set to be loaded before sorting (In this case, it also never comes back).
Thanks!!