• Golfer22 (5/26/2013)


    ...

    If you could use table variables instead of temporary tables, that could help. But it requires a large amount of memory. Upgrading memory could help.

    ...

    Using table variables is not necessarily the best option. Since there are no statistics on table variables SQL Server assumes 1 row even if there are 100,000 rows. This can easily result in a poor execution plan.

    Also, table variables can use tempdb just as temporary tables.