Consider the table people with this definition:
The application uses a query such as:
SELECT * FROM people WHERE YEAR(Birthday) = 1980;
The query is not using an index.
Which two methods can be used to allow the query to use an index? (Choose two.)
Change the WHERE clause to Birthday BETWEEN 1980-01-01 AND 1980-12-31.
Add a functional index for YEAR(Birthday).
Execute ANALYZE TABLE to update the index statistics.
Add a generated column calculating YEAR(Birthday) and index that column.
Add FORCE INDEX (Birthday) to the query.
Submit