Foxtable(狐表)用户栏目专家坐堂 → sqlcompute计算如何优化


  共有2154人关注过本帖树形打印复制链接

主题:sqlcompute计算如何优化

帅哥哟,离线,有人找我吗?
xujie80
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:350 积分:3412 威望:0 精华:0 注册:2015/5/12 15:33:00
sqlcompute计算如何优化  发帖心情 Post By:2017/6/27 9:23:00 [显示全部帖子]

For Each nm As String In DataTables("haihe").sqlGetValues("部门村居")
    Dim dr As DataRow = DataTables("zc").AddNew()
    dr("部门村居") = nm
    dr("宅基地面积") = DataTables("haihe").sqlCompute("sum(宅基地面积)","[部门村居] = '" & dr("部门村居") & "'")
    dr("主房面积") = DataTables("haihe").sqlCompute("sum(主房面积)","[部门村居] = '" & dr("部门村居") & "'")
    dr("附房面积") = DataTables("haihe").sqlCompute("sum(附房面积)","[部门村居] = '" & dr("部门村居") & "'")
Next
这段代码循环次数30次,数据量3万条,耗时6.67S,这样客户打开窗口时间过长,如何优化?

 回到顶部