用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