SQL>
select *
from (select rownum as rn, a.*
from (select *
from t100 a
where object_id > 1500
and owner = 'SYS'
order by object_id desc) a
where rownum <= 40) a
where rn >= 1;
SQL> select count(*) from t100;
COUNT(*)
----------
12083584
SQL> select count(*) from t100 where owner='SYS';
COUNT(*)
----------
4838784
SQL> select count(*)
from t100 a
where
owner = 'SYS'
and object_name like '%LOG%' 2 3 4 5 ;
COUNT(*)
----------
37632
创建索引1:
CREATE INDEX "SYSTEM"
分页SQL 的各种索引对比
最新推荐文章于 2024-04-12 13:48:47 发布
本文详细探讨了在执行分页查询时,不同类型的索引(如B树、哈希、全文索引等)如何影响查询性能。通过实例分析,揭示了在大数据量场景下,如何选择合适的索引来优化分页查询,降低数据库负担,提高系统响应速度。
摘要由CSDN通过智能技术生成