PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

mssql insert into 和insert into select性能比较

原创
2016-06-07 18:00:05 1752浏览

今天没事,测了一下insert into和insert into select的性能,没想到这两个性能差别这么大。

使用insert into table(field, ...)values(value, ...),insert into table(field, ...)values(value, ...)...的情况

使用insert into table(field, ...)select(value,...) union all select(value,...) union all select(value,...) ...的情况

我一次插入的数据是:1190条。用insert into所用的时间在510毫秒上下徘徊,而用insert into select所用的时间在16毫秒上下徘徊。

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。