sql - How to optimumly perform a MySQL query on a datetime column using only the time component -
i have mysql datetime column want query against, want query time of day component of datetime column, believe using functions hour() minutes() etc create full table scans. using query below not optimum.
select datetime_col articles time(datetime_col) > "09:00:00" && time(datetime_col) < "13:00:00"
what best way query time component?
Comments
Post a Comment