倒,各位老大,俺打错了,是500毫秒:)留言薄嘛,你不一次取完怎么取?难道用top?没有什么按条件取的:) 不过第一次访问的时候特慢,用了近30秒才打开首页,当然第一需要查询,结果我保存到了Cache中,以后就快了,不过15000条和1500条差别不大:)可能和用Cache有关吧先把ACCESS搞定,然在用SQL SERVER
the first select uses select top 10 * from yourtablenow, remember the last ID, for the next 10 you will useselect top 10 * from yourtable where ID > YourLastID now, remember the last ID and first ID, for the next 10 you will useselect top 10 * from yourtable where ID > YourLastID for the previous 10 you will use Select * from (select top 10 * from yourtable where ID < YourFirstID order by ID DESC) t order by ID
不过第一次访问的时候特慢,用了近30秒才打开首页,当然第一需要查询,结果我保存到了Cache中,以后就快了,不过15000条和1500条差别不大:)可能和用Cache有关吧先把ACCESS搞定,然在用SQL SERVER
这个问题真的太难了!只有从SQL语句入手,可惜无法取得这个ID号,不知道谁可以给我个例子
我现在写程序一般都是全取出来,当然分类的可以按类别取:)
now, remember the last ID and first ID, for the next 10 you will useselect top 10 * from yourtable where ID > YourLastID
for the previous 10 you will use Select * from (select top 10 * from yourtable where ID < YourFirstID order by ID DESC) t order by ID