• Does your table variable have a primary key and is that used to join to the other tables? If not, that's going to be a performance problem right there since table variables don't maintain statistics. You may want to switch to a temporary table instead.

    If it's an ad hoc query you may be seeing recompiles. Have you watched the execution through profiler?

    "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