Posted on 2009-01-06 00:41
Robert Su 阅读(169)
评论(0) 编辑 收藏
看到网上说select * from ( select row_.*, rownum rownum_ from (sql) row_ where rownum <= ?) where rownum_ >?
这种方法是最快的,特做实验验证之
select row_.*, rownum rownum_ from (select * from web_video) row_ where rownum BETWEEN 1 and 100
0.05675s 0.1181s
select row_.*, rownum rownum_ from (select * from web_video) row_ where rownum BETWEEN 100 and 1000
22.269s
select * from ( select row_.*, rownum rownum_ from (select * from web_video) row_ where rownum <= 100) where rownum_ >0
0.156s
select * from ( select row_.*, rownum rownum_ from (select * from web_video) row_ where rownum <= 1000) where rownum_ >100
0.037s