新微赢技术网

标题: [讨论]查询速度太慢 [打印本页]

作者: 芯頽廢.。﹖    时间: 2010-1-8 01:36
标题: [讨论]查询速度太慢
各位老师:
以下是完整查询语句,但是查询2000条信息都要1分多钟,请问各位老师,怎么改速度才快些呀!

<td colspan="8" nowrap><div align="left">
<%
set rs=server.CreateObject("adodb.recordset")
if request("DATA")="" and request("DATA1")="" then
sql="select sum(BANKNOTE) as BANKNOTE1,sum(LETTER) as LETTER1, sum(WEIGHT) as WEIGHT1 FROM ESDISPATCH "
ELSE
sql="select sum(BANKNOTE) as BANKNOTE1,sum(LETTER) as LETTER1, sum(WEIGHT) as WEIGHT1 FROM ESDISPATCH WHERE DATA between #"&cdate(request("DATA"))&"# and #"&cdate(request("DATA1"))&"# "
END IF
rs.open sql,conn,1,1
%>结果统计:票数【<font color='blue'><%=rs("BANKNOTE1")%></font>】票&nbsp;件数【<font color='blue'><%=rs("LETTER1")%></font>】件&nbsp;重量【<font color='blue'><%=rs("WEIGHT1")%></font>】KG
</div></td>
作者: Secret    时间: 2010-1-8 01:37
我刚看,所以才有此想法
但是不知道怎么改!
能提提意见吗?谢谢!
作者: 专属天使    时间: 2010-1-8 01:37
http://bbs.bc-cn.net/viewthread.php?tid=156547

建议看看上面的帖子!




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2