分类目录

链接

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

近期文章

热门标签

新人福利,免费薅羊毛

临时表与union all的性能差别

机器:cpu: 2g 内存: 2g 数据库:sql 2005 根据机器配置不同,结果会有不同. 性能测试说明: 1. 数据库服务器重启之后进行查询.即第一次查询的结果. 2. 是对数据库查询的性能比较. 测试情况: 1.在存储过程中使用临时表: (proc1) select top 1000 * into #t1 from somast insert into #t1 select top 100 * from somast select * from #t1 ---删除表数据 TRUNCATE TABLE #t1 --删除临时表 drop table #t1 执行时间为: 1039ms 2. 在存储过程中使用union all: (proc2) select top 1000 * from somast union all select t...

SQL Server 暂无评论 阅读(2,284)