Poor performance after using alter session
We are developing a Java application, and in our queries, we need to ignore special characters such as "á" or '...
Ejm. A query for "Raúl" should consider "Raúl" and "Raul"...
To do this, we found these two alter session sentences that helped us to do that:
stmt.execute("ALTER SESSION SET NLS_COMP=LINGUISTIC");
stmt.execute("ALTER SESSION SET NLS_SORT=BINARY_AI");
The problem is, that after executing those two sentences, performance becomes very poor, a result set, that takes around a second to be retrieved, takes more than 3 minutes after executing the "alter session" commands.
Is there a better way to achieve this?
Ejm. A query for "Raúl" should consider "Raúl" and "Raul"...
To do this, we found these two alter session sentences that helped us to do that:
stmt.execute("ALTER SESSION SET NLS_COMP=LINGUISTIC");
stmt.execute("ALTER SESSION SET NLS_SORT=BINARY_AI");
The problem is, that after executing those two sentences, performance becomes very poor, a result set, that takes around a second to be retrieved, takes more than 3 minutes after executing the "alter session" commands.
Is there a better way to achieve this?
0