title: optimizing Query with datediff() in mysql
body: <p>I have a Query like below</p>
  
  <pre><code>select 
  id,name,baseid,member_card_type,membercard_num,last_draw,counter 
  from details_dest
  where datediff(curdate(),basedate)&lt;100;
  </code></pre>
  
  <p>i have used the explain on that and found it is using index which is on basedate and i think date_diff is the problem</p>
  
  <p>so please suggest me is there any other way to execute it without any functions</p>
  
  <p>and kindly tell me which is better datediff() or to_days() in according to performance</p>
  
  <p>i am using mysql 5.5</p>