This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
parallel queries

SQL SERVER – Table Variables, Temp Tables and Parallel Queries

June 7, 2021
Pinal Dave
SQL Performance
Parallel, SQL CPU, SQL Scripts, SQL Server, SQL Variable, Temp Table

I heard an interesting comment from a client and that made me write a blog post. Their point was about table variables, temp tables, and parallel queries.

Read More
Table Variable Stored

Where are Table Variables Stored? – SQL in Sixty Seconds #095

August 6, 2020
Pinal Dave
SQL Video
SQL in Sixty Seconds, SQL Memory, SQL Performance, SQL Scripts, SQL Server, SQL Variable, Temp Table

A very popular question we will answer today Where are Table Variables Stored? Recently I have posted a few videos on my YouTube Channel,

Read More
Illustrated cover: Table Variable vs Temp Table

SQL SERVER – Table Variables or Temp Tables – Performance Comparison – SELECT

September 23, 2019
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL TempDB, SQL Variable, Temp Table

Today we are going to discuss the performance comparison of table variables and temp tables when we are running SELECT queries.

Read More
Illustrated cover: #Temp

SQL SERVER – Table Variable or Temp Table – Performance Comparison – INSERT

September 21, 2019
Pinal Dave
SQL Performance
SQL Scripts, SQL Server, SQL Variable, Temp Table

In this blog post, we will talk about Performance Comparison between Table Variable or Temp Table. Comprehensive Database Performance Health Check

Read More
Dynamic SQL into Variable.

SQL SERVER – Results of Dynamic SQL Into A Variable

November 20, 2018
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Scripts, SQL Server, SQL Variable

Is there a way to store results of dynamic SQL into a variable? A client asked me this during a health check, and here is the answer with sp_executesql.

Read More
A carpenter's apron with a sagging pocket full of nails, and a large nail bin on a far shelf of the workshop.

Memory-Optimized Table Variables

May 25, 2014
Pinal Dave
SQL Performance
In-Memory OLTP, SQL Memory, SQL Server, SQL TempDB, SQL Variable

Memory-optimized table variables can avoid tempdb work, but they need a filegroup, indexed table type, memory budget, and workload tests.

Read More
A puddle on the path, with a red scarf, a carrot and coal saved on the step

Table Variables Survive ROLLBACK: Logging Errors in a Transaction

September 28, 2013
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Transactions, SQL Variable

See how table variables survive rollback to retain error details, then write a permanent error log after a failed SQL Server transaction.

Read More
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com