I assume that
SELECT * FROM Table1 t1
INNER JOIN Table2 t2 ON (t1.Day = t2.Day AND t1.Id = t2.Id)
WHERE t2.Id = 1
AND t2.Day = DATE_FORMAT(DATE_ADD('2013-11-01', INTERVAL 1 DAY),'%Y-%m-%d');
will return an empty result.
Impossible WHERE noticed after reading const tables
is not performance related. The EXPLAIN
is just telling you that there is no dataset found with your given WHERE condition. So maybe there are no datasets in Table2 with Id = 1 OR Day = '2013-11-02'?
If you solved the Impossible WHERE...
you can start optimizing your query with the EXPLAIN result (400ms seems to be very slow).