新人一个,想问个oracle排序问题,我想取得某个表中创建时间最晚的前5条数据,但是考虑到order by 的性能问题,还有其他的办法吗?
用order by 的原句:
select *
from (select *
from process_info pif
where pif.create_ is not null
order by pif.create_ desc) tab
where rownum <= 5;
除非你知道数据特点,取max时间,加减后获取开始时间,缩减数据量
没法知道呐。。这个是实时的数据