I have found an interesting quirk about table variables and sql server 2005. When I create a table variable to insert records into,all parallelism in the query plan is removed. I found that you can use table variables in joins and they themselves can partake in parallel operations. As an example.
select distinct OrderNumbers
from Thistable t
where exists(select 1
from @ordernums o
The above statement will allow for parallel scans of both the @ordernums table and This table (if the optimizer chooses).
However, if you do the following:
select top(5) ONum, sum(mysales)
Any parallel plans sql server might have thought of are thrown out the window. This took me a few hours to track down because I didn't even think of looking at the insert.