I have a timestamp column and I have to filter by year. My db has about 10000 rows table.
This is my low query:
SELECT * FROM my_table WHERE DATE_FORMAT(my_timestamap_data, "%Y") = "2018"
how can I improve my performance? The best way is create an index?
thank you!
SELECT * FROM my_table WHERE YEAR(my_timestamap_data) = 2018