[讨论]查询速度太慢
各位老师:以下是完整查询语句,但是查询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>】票 件数【<font color='blue'><%=rs("LETTER1")%></font>】件 重量【<font color='blue'><%=rs("WEIGHT1")%></font>】KG
</div></td>
[此贴子已经被作者于2007-7-19 19:23:11编辑过]