oracle查询当天数据三种方式性能对比
1、select count(*) from sys_config_file where app_node ='wangjie' and to_char(create_date,'yyyy-mm-dd')=to_char(sysdate,'yyyy-mm-dd');
0.062秒
2、select count(*) from sys_config_file where app_node ='wangjie' and trunc(create_date)=trunc(sysdate);
0.093秒
3、select count(*) from sys_config_file where app_node ='wangjie'
and create_date>=trunc(sysdate) and create_date<trunc(sysdate)+1;
0.015秒
JAVA修炼塔,技术世界的探知与交流,欢迎你的加入-----群号:535296702

浙公网安备 33010602011771号