zoukankan      html  css  js  c++  java
  • 关联查询之速度优化

    在有些关联表的数据比较多的情况,可以先筛选出一部分临时表。然后用临时表关联。优化速度从15s提升到3s

    形式如

    select * into #tempTable1 from Table1 where CurrentVersion_SID=@temp_versionID select * into #tempTable2 from Table2 where CurrentVersion_SID=@temp_versionID select * into #tempTable3 from Table3 where CurrentVersion_SID=@temp_versionID select * into #tempTable4 from Table4 where CurrentVersion_SID=@temp_versionID select * into #tempTable5 from Table5 where CurrentVersion_SID=@temp_versionID

    中间各种关联查询

    DROP TABLE #tempTable1 DROP TABLE #tempTable2 drop table #tempTable3 drop table #tempTable4 drop table #tempTable5 drop table #tempTable6 drop table #tempTable7

    打赏
  • 相关阅读:
    取球问题
    汉字首字母
    上三角
    循环小数
    拓扑排序
    倒水
    equals方法使用技巧
    Java库中的集合
    win10安装Redis方法以及基本配置
    c、c++函数随机
  • 原文地址:https://www.cnblogs.com/yanshaoxiong/p/6674297.html
Copyright © 2011-2022 走看看