请问各位高手如此检索一个很多记录的数据库,那种方法效率更高?
方法一:
……
news.open("select * from news order by id asc"),conn,1,1
<%
newscount=5
do while not news.eof and newscount>0
%>
<tr>
<td>
<%=news("newstitle")%>
</td>
<%
newscount=newscount-1
news.movenext
loop
news.close
set news=nothing
方法二:
……
news.open("select top 5 * from news order by id asc"),conn,1,1
do while not news.eof
%>
<tr>
<td>
<%=news("newstitle")%>
</td>
<%
news.movenext
loop
news.close
set news=nothing
小弟谢谢各位啦!