Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NLS settings and performance degradations

lesakMay 26 2017 — edited May 26 2017

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.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2017
Added on May 26 2017
9 comments
1,129 views