Hello,
I have problem with this query, complexity of this query is not good, i use this query from long time and now this database have many rows to get selecting by this method. All index'es is added propertly. I searching some other method to optimize this query by date comparsion because this is bottleneck in this solution.
SELECT (...) FROM table
WHERE (YEAR(row_add_date) * 10000 +
MONTH(row_add_date) * 100 +
DAYOFMONTH(row_add_date)) >= (var_0 * 10000 + var_1 * 100 + var_2) and
(YEAR(row_add_date) * 10000 +
MONTH(row_add_date) * 100 +
DAYOFMONTH(row_add_date)) <= (var_3 * 10000 + var_4 * 100 + var_5)
Can anyone help me? Greetings