oracle 分页性能

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wyljz/article/details/81129311

用户表T_DB_USERS,记录数60万

分页语句一:

select t.*,rawtohex(SYS_GUID()) mmm_guid from ( select a.*,rownum rn from T_DB_USERS a) t where rn>10 and rn<=30;

执行时间 0.281 秒

分页语句二:

select t.*,rawtohex(SYS_GUID()) mmm_guid from ( select a.*,rownum rn from T_DB_USERS a where rownum<=30) t where rn>10 ;

执行时间 0.031 秒

第二种比第一种快了不少

猜你喜欢

转载自blog.csdn.net/wyljz/article/details/81129311
今日推荐