Consider the following query:
SELECT * FROM Transactions
WHERE day(Stamp - interval 3 hour) = 1;
The Stamp column in the Transactions table is a TIMESTAMP and there is an index on it. How could I change this query so it avoids full table scans? (that is, using Stamp outside of the day() function)
Thanks!