最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

performance - Different performace in different way of insertion to temp table in SQL Server - Stack Overflow

programmeradmin2浏览0评论

I have noticed a huge difference while inserting into a temp table via two different methods.

Method 1: (super fast: 4secs)

create table #temp (c1 int, c2 varchar(50), c3 varchar(50), ...)
insert into #temp
select c1, c2, c3, ...
from table1

Method 2: (normal: 57secs)

select c1, c2, c3, ...
into #temp
from table1

There are no concurrent processes on the server. Could you please clarify the difference ?

发布评论

评论列表(0)

  1. 暂无评论