Is that really a NOLOCK hint on that query? ;c)
Did you capture an ‘actual’ execution plan from the run that took 1 second? I would have expected to see a hash or merge join rather than nested loops – and thicker connecting lines representing the higher row counts.
Your last sentence says “…with table variables the SQL Server has statistics…” – perhaps that is a typo? Statistics are not created for table variables.
Although statistical information is not available for table variables, if you use an OPTION (RECOMPILE) query hint, the run-time [I]cardinality[/I] of the table variable is available to the optimizer.
Using this hint would have allowed the optimizer to ‘see’ the 190,000+ rows in the table variable, resulting in a much better plan. One other benefit to using OPTION (RECOMPILE) here is that the optimizer could see the run-time value of @BatchSize.