日期:2014-05-16  浏览次数:20749 次

用to_char方式查找日期为指定年月的数据,用时2秒多,有没有快点的方法
用to_char方式查找日期为指定年月的数据,
to_char(rq,'yyyymm')='201403' ,返回的记录数量大概3万多条,
用时2秒多,
有没有快点的方法?

------解决方案--------------------
不使用函数,直接进行日期对比呢
如:
rq between to_date('20140301','yyyymmdd') and to_date('20140331','yyyymmdd')