I am trying to select only today\'s records from a database table.
Currently I use
SELECT * FROM `table` WHERE (`timestamp` > DATE_SUB(now(), INTE
use DATE and CURDATE()
DATE
CURDATE()
SELECT * FROM `table` WHERE DATE(`timestamp`) = CURDATE()
I guess using DATE still uses INDEX.
see the execution plan on the DEMO