|
Posted by Hugo Kornelis on 12/09/05 23:56
On Fri, 9 Dec 2005 20:22:23 +0000 (UTC), Erland Sommarskog wrote:
>Hugo Kornelis (hugo@pe_NO_rFact.in_SPAM_fo) writes:
>> Same for temp tables - except very rare cases where the optimizer goofs
>> up and creates a sub-optimal query plan, it's better to just write one
>> complex query and let SQL Server figure out the best way to process it.
>
>Sometimes you need to reuse a table expression in a query. In this case a
>table variable or temp table may be a good idea to hold the intermediate
>result, so that it is only computed once.
Hi Erland,
Yes, you're right. I forgot to mention that. Thanks for the addition!
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
[Back to original message]
|