Hi,
When I set NLS parameter by session like below:
alter session set nls_comp='LINGUISTIC';
alter session set nls_sort = 'BINARY_AI';
and execute query:
select * from cities where lower(name) like 'wrocław%';
Everything on database works great. But unfortunately I can't change session parameters so I try do something like that:
select * from cities where utl_raw.cast_to_varchar2((nlssort(name, 'nls_sort=binary_ai'))) like 'wrocław%';
But the second option have real performance problem and I can't use it on production. Can you exaplain me how I should use nls_sort as BINARY_AI in optimal way without changing session parameter?
P.S. Explain plan in both examples show same plan and very low cost.