Hello.
My question concerns a large data table that has a DATETIME column called dt. Specifically, I am often having to do selects based on date and time functions that look like this:
select * from my_table where hour(dt)= 0
or
select * from my_table where month(dt) = 6
What index should I create to optimize selects on these sorts of queries? ["create index my_index on my_table(dt)" does not help.]
Thanks. -JC