• As GSquared pointed out above, table variables work in a similar fashion. Statistics aren't maintained on them (except when there is a primary key) so the optimizer always assigns them one row.

    Why are you loading the data into a temporary table? Why not simply perform the select statement as is, or if you need to join to this data, make it a derived table?

    The query you show doesn't need the table variable at all.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning