Why is this MySQL query taking so long?
Instead of
'2020-04-30' = date_add(op.dataDate, INTERVAL 14 DAY);

Use
op.dataDate = date_sub('2020-04-30', INTERVAL 14 DAY);

Your first statement will be interpreted as &quot;add 14 days to all dataDate and return when that is 2020-04-30.&quot;  This will require a full scan of the table.
The second statement will evaluate to: &quot;return records where the dataDate is 2020-04-16.&quot;  This allows the engine to perform a seek on your index that begins with dataDate.
Do whatever weird stuff you want to do to expDate since that won't factor much into how the query engine will optimize.