nls_sort on index definition causes index not to be used

  • From: "Beckstrom Jeffrey" <JBECKSTROM@xxxxxxxxx>
  • To: "oracle-l-freelists" <oracle-l@xxxxxxxxxxxxx>, "oracle-db-l" <oracle-db-l@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 22 Feb 2017 12:47:25 -0500

We have a 3rd party application for which indexes are built with 
nls_sort=punctuation on some of the columns. From SQL Plus a simple select on 
the column is using a full table scan. With a hint, it uses a full scan of the 
index. I presume the problem is the nls_sort.  Example:  
                                                                                
 U 
N prefix 
INDEX_NAME OWNER Q length COLUMN_POSITION COLUMN_NAME COLUMN_EXPRESSION 
------------------------------ --------- - ---------- --------------- 
------------------------------ -------------------- 
EMPLOYEE_IDX1 xxxxxx    Y 1 SYS_NC00042$ NLSSORT("EMPLOYEE_ID 
",'nls_sort=''PUNCTU 
ATION''')                        

Can someone tell me why?

Other related posts: