Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

What is The Difference Between SQL Server: Performance Insert Into vs Select Into?

Asked by Anna Ball Apr 22, 2021 9 views 1 answer
Share

About this question

I am hearing different things from colleagues/research. What are good guidelines in performance for SELECT INTO vs INSERT INTO when creating a temp table? I know the difference is minimal for small tables. Eg: The table has 20 columns, 50 million rows. I've had DBAs state, Insert into is faster, since compiler/parser, does not need to find Column data types on the fly. Others stating SELECT INTO is faster. We conducted performance testing, and seems SELCT INTO into is slightly faster. What are good principles in figuring which is faster and why? I would think Microsoft would optimize to make INSERT INTO just as fast, for careful programming. The article states the following.

SQL Server Performance of SELECT INTO vs INSERT INTO for temporary tables

However, the question is, why wouldn't Microsoft optimize to make INSERT INTO as fast as SELECT INTO? We have over 500 stored procedures to write for the data warehouse and require good guidelines for temp usage. This article does not really focus on performance and reasons: INSERT INTO vs SELECT INTO The person in the article mentioned a good point:

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.