记录一下:
总共有1200002数据,打开索引时访问时间为
方法一:
时间:0.168s
select count(*) from "xx"."xx" where present_area_code like '0.1.440106.%'
and to_char(create_time, 'yyyy') =2020;
执行过程
方法二:
时间:0.096ms
select count(*) from "xx"."x'x" where present_area_code like '0.1.440106.%'
and create_time >=
to_date('2020-01-01 10:00:00', 'yyyy-mm-dd hh24:mi:ss')
and create_time<=
to_date('2020-12-31 10:00:00', 'yyyy-mm-dd hh24:mi:ss')
使用范围查找速度更快