首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

在存储过程中不断的创建临时表又删除临时表对速度有没有影响?解决方法

2012-03-22 
在存储过程中不断的创建临时表又删除临时表对速度有没有影响?在存储过程中不断的创建临时表又删除临时表对

在存储过程中不断的创建临时表又删除临时表对速度有没有影响?
在存储过程中不断的创建临时表又删除临时表对速度有没有影响?
  create   table   #t(id   int,zy   int)
...
  drop   table   #t
  create   table   #t1(id   int,jy   int)
....
  drop   table   #t1

.....

[解决办法]
影响是有不大
如果临时表的数据大时可以先
truncate table #

drop table #
这样操作时不会占太多的资源

热点排行