I had a very interesting conversation with one of my clients about Cardinality Estimation for Temp Table vs Table Variable. Let us discuss it today.
Today we are going to discuss the performance comparison of table variables and temp tables when we are running SELECT queries.
Question: Where is Table Variable Created?
Answer: On Hard Disk and NOT in Memory.
I suggest you read the following blogs
In this blog post, we will talk about Performance Comparison between Table Variable or Temp Table. Comprehensive Database Performance Health Check
After the blog posts about temp and regular table, I have received questions about it hence I am writing this blog post about TempDB Logging.
What is more optimal for the data load – Temp Table or Regular table? Why? The question was very simple but interesting one and I have decided to answer.