select count(1) as testPeopleNum, count(distinct A.sample_code) as sampleNum from c_sample_info A where to_char(now(),'yyyy-mm-dd')=to_char(A.sample_receive_time,'yyyy-mm-dd') and A.sample_receive_user ='zz'
查询A.sample_receive_time 这个时间等于当天的数据;用了to_char之后,是不是索引就用不到了,该如何优化呢。
A.sample_receive_user 有索引,但是好像没用到