I have a table like
Table1:
col1
col2
col3
and have an index over col3.
If I select the data from the table with the following query.
SELECT * FROM Table1 WHERE LCASE(col3) ='abcde'
Does the index help over the performance?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer: No.
Long answer: No.
Imagine the following contents in your col3:
The index on col3 would know this order:
However, the order of the query lcase(col3) would be
completely different from the index, so the index is of limited use.
However, you could add an automatically created field with the lower case to your table:
the select above would then use the
col3_lcase_idxindex.