Quantcast
Channel: Go4Expert
Viewing all articles
Browse latest Browse all 1987

How to Tune SQL Statement with LCASE function on index field?

$
0
0
Some business requirements may need to compare the lower case of an indexed column to a given string as a data retrieval criterion.

Here is an example SQL that retrieves records from the EMPLOYEE table employee if the lower case of the name is equal to the string ‘richard’.

select *
from employee
where LCASE(emp_name)='richard'

Here the following are the query plans of this SQL, it takes 17 seconds to finish. The query shows a “Full Table Scan Employee”...

How to Tune SQL Statement with LCASE function on index field?

Viewing all articles
Browse latest Browse all 1987

Trending Articles