Using:
SELECT p.* FROM POST p WHERE p.date BETWEEN '2011-03-01' AND DATE_SUB('2011-04-01', INTERVAL 1 SECOND)
This will use the index if it exists in POST.date , if the function (IE: MONTHNAME, MONTH) is not used in the POST.date column.
OMG Ponies
source share