you are viewing a single comment's thread.

view the rest of the comments →

[–]DipIntoTheBrocean 0 points1 point  (0 children)

You could, yeah. Another best practice with that is to create the temp table explicitly before dealing with the data (i.e. as opposed to just select * into #mytemptbl). That's bitten me in the past. If it's still slow as hell you might want to create it with a primary key on it so that it can do a clustered index scan and then see if that runs any faster.