Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Pagination with Complex Queries
Message
From
18/06/2009 09:53:35
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Application:
Web
Miscellaneous
Thread ID:
01406794
Message ID:
01406856
Views:
56
>>See the order here:
>>
>>Re: Interview questions Thread #1380550 Message #1401825
>>
>>
>
>In this particular case I believe we need to get the result first in order to apply Row_Number()

Yeah, I was referring to slow performance he may be experiencing using UNION in his query. AFAIK, union is a very slow process because the sql server will walk through both result sets to eliminate duplicates. If you add ALL to the union, it tells SQL that duplicate checking is not required. It will increase the speed of the unioning but union is still slow on large data.

Are both queries (with and without union) too slow?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform