用SQL语句进行分页查询,每次只取一部分数据。这样查询效率提高很多。
Oracle分页查询语句:
原始查询语句:select a,b,c from tableName where a=1 order by c
转换后的Oracle分页语句:只查询第11至第20的纪录
select * from (select rownum as numrow,c.* from (
select a,b,c from tableName where a=1 order by c
) c)where numrow>=11 and numrow<20
Oracle分页查询语句:
原始查询语句:select a,b,c from tableName where a=1 order by c
转换后的Oracle分页语句:只查询第11至第20的纪录
select * from (select rownum as numrow,c.* from (
select a,b,c from tableName where a=1 order by c
) c)where numrow>=11 and numrow<20
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货