Query Tuning Essentials: How Table Variables Hurt SQL Server Query Performance
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. I’m offering a 75% discount to my blog readers if you click from here. I’m also available for consulting if you just don’t have time for that, and need to solve database performance problems quickly. You can also get a quick, low cost health check with no phone time required.
It might be worth mentioning that if there could be many rows a TVP it can sometimes be worth the overhead to copy it into to a temp table (with TABLOCK, of course) and then using the temp table for joins instead of that TVP, for all the reasons you describe in the video.