ORACLE 11g case insensitive by default

前端 未结 4 1104
情歌与酒
情歌与酒 2020-12-18 03:51

I found in this article, that since ORACLE 10g, there is a way to make a particular connection-session compare strings case-insensitive, without needing any crazy SQL functi

4条回答
  •  太阳男子
    2020-12-18 04:27

    I tried using a logon trigger to issue these commands to get case-insensitive queries:

    execute immediate 'alter session set NLS_SORT=BINARY_CI';
    execute immediate 'alter session set NLS_COMP=LINGUISTIC';
    

    And while that did give me CI, it also gave me unbelievably bad performance issues. We have one table in particular that, without those settings, inserts take 2 milliseconds. With those settings in place, inserts took 3 seconds. I have confirmed this by creating and dropping the trigger multiple times.

    I don't know if doing it at the system level, as opposed to the session level with a trigger, makes a difference or not.

提交回复
热议问题