请问高手:大数据量情况下如何返回指定条数的记录? 你可以用select * from tablename where rownum between 10 and 20; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from (select rownum id,a.* from tablename a order by ...) bwhere b.id between 10 and 20; rownum!select *from tablewhere rownumorder by field. to snowy_howe(天下有雪) 这种方法是不是最优的办法?这样实际上是搜索出实际的条数(比如5万条),再从中取了几条。速度和搜索五万条记录一样。 to : buddyxue(薛训明) 你可以用select * from tablename where rownum between 10 and 20;单纯的rownum似乎是不行的,你可以试试. select * from (select rownum id,tbname.* from tbname where rownum<=20) awhere a.id>=10; select * from (select rownum id,tbname.* from tbname where rownum<=20) awhere a.id>=10; 这个问题,你看看这个,讨论的比较详细了:http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&h=1&bpg=1&age=0 你可以分段统计,如根据表中某一字段id,然后累计所得结果select count(*) from tbname where id<100000select count(*) from tbname where id>=100000 and id<1000000...select count(*) from tbname where id>10000000 结贴,请看 tuidler() 推荐的:http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&h=1&bpg=1&age=0 update嵌套两个select oracle建job报错 oracle安装问题 ODBC连接失败,请大家帮忙解决下。谢谢 一个oracle端口问题 Oracle数据库 求一个Oracle的存储过程 存储过程 动态查询用户下的表 监听的问题 由SQL轉向ORACLE,來者有分 如何在同一语句中操作2个链路?? 怎么不能删除数据?
where b.id between 10 and 20;
from table
where rownum
order by field.
这种方法是不是最优的办法?
这样实际上是搜索出实际的条数(比如5万条),再从中取了几条。速度和搜索五万条记录一样。
where a.id>=10;
where a.id>=10;
http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&h=1&bpg=1&age=0
select count(*) from tbname where id<100000select count(*) from tbname where id>=100000 and id<1000000
.
.
.
select count(*) from tbname where id>10000000
http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&h=1&bpg=1&age=0