You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we do most time-related queries with this structure: SELECT count(down_id) FROM track_e_downloads WHERE DATE_ADD(down_date, INTERVAL 5 MINUTE) >= '2021-09-21 20:50:02';
This seems to be very difficult for MySQL to optimize (not able to use an index on track_e_downoads.down_date, for example).
It looks like a first pre-query to get DATE_ADD() in a string and then just comparing the date string to down_date straight would be enough.
The text was updated successfully, but these errors were encountered:
Right now we do most time-related queries with this structure:
SELECT count(down_id) FROM track_e_downloads WHERE DATE_ADD(down_date, INTERVAL 5 MINUTE) >= '2021-09-21 20:50:02';
This seems to be very difficult for MySQL to optimize (not able to use an index on
track_e_downoads.down_date
, for example).It looks like a first pre-query to get DATE_ADD() in a string and then just comparing the date string to
down_date
straight would be enough.The text was updated successfully, but these errors were encountered: