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!

Linguistic index with LIKE + LOWER

PauloDec 17 2013 — edited Dec 18 2013

Hi,

It seems that Oracle 11.2.0.1.0 is not able to use linguistic index when using the LIKE operator + LOWER function...

ALTER SESSION SET NLS_COMP='LINGUISTIC';

ALTER SESSION SET NLS_SORT='FRENCH_AI';

CREATE INDEX test_fai_idx

ON mytable(NLSSORT(LOWER(somefield), 'NLS_SORT=FRENCH_AI'));

SELECT *

FROM mytable

WHERE LOWER(somefield) LIKE 'gue%';

-- Table access FULL

DROP INDEX test_fai_idx;

ALTER SESSION SET NLS_COMP='BINARY';

CREATE INDEX test_bin_idx

ON mytable(LOWER(somefield));

SELECT *

FROM mytable

WHERE LOWER(somefield) LIKE 'gue%';

-- Index Range Scan

Questions:

-Will an upgrade to 11.2.0.2, 11.2.0.3 or 11.2.0.4 could solve that problem? (if anyone of you who have access to such a db and could make the test and report the result here, that will be much appreciated)

-Other ideas to help me?

I understand that using LOWER + AI seem strange since AI means accent-insensitive AND case-insensitive but, the software which run on the db use LOWER in all his SQL...

Thanks.

Paulo

Comments

843810
Try this
String cmd = "java -jar \"" ++workingDir ++"\"/SwingApplication.jar"; 
Edited by: DynamicBasics on Jul 15, 2010 5:31 PM
User_64CKJ
A good case for using ProcessBuilder.
843810
String cmd = "java -jar \"" ++workingDir ++"\"/SwingApplication.jar";

doesnt seem to work, so i tried using process builder as suggested

ProcessBuilder pb = new ProcessBuilder("java -jar");
pb.directory(new File(workingDirPath + "/SwingApplication.jar"));
Process p = pb.start();

. but getting an exception

java.io.IOException: Cannot run program "java -jar" (in directory "C:\Run Application\SwingApplication.jar"): CreateProcess error=267, The directory name is invalid

Do I need to change the directory path in this?
User_64CKJ
javaquests wrote:
..ProcessBuilder pb = new ProcessBuilder("java -jar");
pb.directory(new File(workingDirPath + "/SwingApplication.jar"));
Process p = pb.start();

. but getting an exception

java.io.IOException: Cannot run program "java -jar" (in directory "C:\Run Application\SwingApplication.jar"): CreateProcess error=267, The directory name is invalid
While..
C:\Run Application\
..might be a directory, is..
C:\Run Application\SwingApplication.jar
?

I was thinking something more like this (untested)..
String path = workingDirPath + "/SwingApplication.jar";
String[] command = {
	"java", 
	"-jar",
	path
};
ProcessBuilder pb = new ProcessBuilder(command);
Process p = pb.start();
BTW - when posting code, code snippets, HTML/XML or input/output, please use the code tags. The code tags protect the indentation anf formatting of the sample. To use the code tags, select the sample and click the CODE button.
843810
javaquests wrote:
String cmd = "java -jar \"" ++workingDir ++"\"/SwingApplication.jar";

doesnt seem to work, so i tried using process builder as suggested
The command to be finally executed is
C:\Program Files\Java\jdk1.5.0\bin\java.exe -jar C:\Run Application\SwingApplication.jar
as the path has spaces, enclose in double quotes
"C:\Program Files\Java\jdk1.5.0\bin\java.exe" -jar "C:\Run Application\SwingApplication.jar"
This goes into the string variable like this
String cmd = "\"C:\\Program Files\\Java\\jdk1.5.0\\bin\\java.exe\" -jar \"C:\\Run Application\\SwingApplication.jar\"";
check the above command once.

Without the absolute path to the JAVA file, the control probably is searching for it in the current working directory.
843810
thank you so much it worked now.
843810
javaquests wrote:
thank you so much it worked now.
You are welcome, and it is a good practice to mark the question as 'answered'.

Edited by: DynamicBasics on Jul 15, 2010 10:38 PM
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 15 2014
Added on Dec 17 2013
2 comments
484 views