Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Java Stored Proc Slow....

Java Stored Proc Slow....

From: Peter <pchristopher_at_munis.com>
Date: 3 Jan 2002 12:30:31 -0800
Message-ID: <a0c6518a.0201031230.654fb055@posting.google.com>


My situation is pretty straightforward. I need a stored procedure to call a UNIX command (actually, an Infomix program, but that's besides the point).

What I am doing is using Java Stored Procedures to call a small piece of Java that I loaded into an Oracle 8i database. The java simply invokes the Java Runtime.exec() to shell the command out the the OS. I chose this because the DBMS_Pipes is not practical to deploy to our customer base.

The JSP method seems very straightforward, but it is running VERY slow. Here are some example times:

ODBC --> JSP --> JAVA (just return back, no runtime call) = .67 secs ODBC --> JSP --> JAVA --> UNIX (no code executed, just return back) = 1.15 secs
(NOTE: calling the JSP from SQL*Plus is insignificantly faster, so ODBC is not my issue!)

Seems way to long considering the Java is just passing along a system call and the Unix command run was an empty shell script. In fact, the UNIX program that I intend to run does a whole lot of work, SQL inserts/updates/deletes and that whole process only takes 0.8 secs. So the JSP call more than doubles the execution time. That is unacceptable to me.

Any suggestions on where the bottleneck may be?? Received on Thu Jan 03 2002 - 14:30:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US