2020-10-21 oracle查询性能

it2025-05-28  8

测试数据 200w

select * from tbl ; 59s select * from tbl where rownum < 10w ; 3.2s select * from tbl where rownum < 100w ; 30.4s select b.* from (select rownum as row_num, a, b, c from tbl a where rownum < 190w) b where b.row_num > 180w ; 4.4s 同上 < 190w ... > 90w ; 29s

说明:

取前10w条数据和中间10w条数据的时间是一样的;前100w条和中间100w条,所用时间也是一样的;抓取数据时间的长短与数据量成正比。
最新回复(0)