• Shooting in the dark 🙂

    - What happens when you use option(recompile ) for the variable table, does it change the loop to a merge ( with sql 2012 SP2 you should be able to use the 2453 trace flag to get accurate estimation for variable tables)

    - Is the variable table outer table in the join ? if no, can you do a option (force order) after changing the physical order of the join.

    - What happens if you add index to the variable table that of the same order of the index that you believe that should be used with TransactionTBL ( I would like to think the join would transform to merge join)