1267715条数据,每页10条
1.【第999980~999990页 0.327】【推荐】
下图为测试第一页的时间
SELECT ID, NAME, IDCARD, GENDER, STARFROM UsersWHERE ROWID IN (SELECT RID FROM (SELECT ROWNUM RN, RID FROM (SELECT ROWID RID FROM Users ORDER BY ID DESC) WHERE ROWNUM < =10) WHERE RN > 0)ORDER BY ID DESC;
2.【第999980~999990页 5.039】【随着页数的增加,会变慢】
下图为测试第一页的时间
SELECT * FROM (SELECT ROW_.*, ROWNUM RN FROM (SELECT ID, NAME, IDCARD, GENDER, STAR FROM Users ORDER BY ID DESC) ROW_ WHERE ROWNUM <=10)WHERE RN > 0;