I've got a query like this:
SELECT account.name, address.first_line
FROM account
JOIN address ON address.id = account.address_id
WHERE
( account.date_updated >= '2016-05-05 12:00:00'
OR
address.date_updated >= '2016-05-05 12:00:00' )
both the user table and the address table have an index on their respective 'date_updated' columns but when I do an explain neither of these indexes are being used.
Is there any way to change this? Or do I simply have to run two separate queries to get the information I want with the indexes being used.
I think this is different to this question: MySQL: how to index an "OR" clause because the fields on either side of the "OR" are from different tables and so you can't put a composite index on them.