>>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"