Can someone help me solve this problem? I have a question about the following feature; can I create a virtual column for it?
select as1.col,as1.col2,as1.col3 from analytics.adjusted_sale_velocity where date(as1.created_datetime)=( select max( date(created_datetime) ) from analytics.adjusted_sale_velocity )
Once the column in the WHERE clause is wrapped with a function (
date
in your case), the MySQL optimizer will not use the index.Your query may be slightly different:
Try and let me know if it's faster.