Total Pageviews

April 9, 2019

4/09/2019 11:05:00 AM
Suppose you want to retrieve the  records

SELECT first_name, last_name, phone_number
  FROM emp
 WHERE UPPER(last_name) = UPPER('xYz123')

though index is on last_name it won't work as
the index is not on  UPPER(last_name)

if you want to good execution  plan
we need to create a index on as follows

CREATE INDEX emp_up_name
    ON employees (UPPER(last_name))
this is called function-based index..
then only the performance will be increased
 
Related Posts Plugin for WordPress, Blogger...