Our Oracle database application contains a Table called PERSON
This Table contains a column called PERSON_NAME
Also we have an INDEX
on this column to speed up SELECT
using this column
So when we use following SQL statement performance is fine
SELECT *
FROM PERSON
WHERE 1=1
AND PERSON_NAME = ' Yajli '
;
But in some business cases
We need to make search by PERSON_NAME
is NOT case sensitive
So We try following SQL statement
SELECT *
FROM PERSON
WHERE 1=1
AND UPPER(PERSON_NAME) = UPPER(' YajLi ')
;
But it lead us to a BAD performance and SELECT query in this case take a lot of time
Any Help How to enhance performance of SELECT
on both cases together
* search by PERSON_NAME
is NOT case sensitive
* search by PERSON_NAME
is case sensitive