My JAVA code is using below select statement for fetching data. Col_1 is an index column but looking into EXPLAIN, i am seeing that this select statement is not utilizing the index. If i remove UPPER function, it is utilizing index but I don't want to change my java code.
SELECT *FROM MY_TABLE WHERE UPPER(COL_1) = UPPER(input_value);
In ORACLE we can create functional index by using below statement but below index creation statement is not working in MySQL (8.0.12-commercial , innodb_version 8.0.12)
CREATE INDEX MY_INDEX ON MY_TABLE (UPPER(COL_1));