In relation to switching on case insensitive queries using
alter session set NLS_COMP=LINGUISTIC;
Can anyone answer the following?
>
Yes, it works.... but I can't for the life of me figure out how to build a linguistic index that the LIKE clause will actually use. Building an index thus, for example:
create index bin_ai on names(NLSSORT("NAME",'nls_sort=''BINARY_AI'''));
makes an index which does get used to good effect by queries such as
select name from names where name = 'Johny Jacobson';
but not by
select name from names where name like 'Johny%';
Hence, in a real-world test with 100,000 records, the LIKE query runs about 100 times slower than the '=' query (3 sec compared to 0.03 sec). Not very scalable. Is there a way to speed this up??
Also is it possible to set session variables such as nls_comp on a database/schema/user level?