Re: executeUpdate takes forever
rouble@xxxxxxxxx wrote:
Hi All,
If I do the following:
String cmd = "INSERT INTO Orders(Id, CompilationTitle,
Template, PurchaseDate, RecievedPayment, CompilationDate, TotalCost,
TotalLength, Customer_Id) VALUES(Orders_sequence.nextval, ";
cmd += "'" + cl.getOptionValue("title") + "', '" +
cl.getOptionValue("template") + "', NULL, 'N', SYSDATE, 0.00, 0, " +
cl.getOptionValue("customerId") + ")";
// run the command
System.out.println(cmd);
stmt.executeUpdate(cmd);
... it takes forever (over 10 minutes). Is there anyway I can debug
this to see what is going on ?
If I run the exact same command on the SQL prompt it takes it
*instantaneously*. Am I missing something ?
Cheers
rouble
Just show us the actual final string you're sending. I assume the time
is all taken in the executeUpdate() call. The way to debug it is to
set the oracle session to print out the query plan. Then compare the
query plan for the SQL-PLUS session to the JDBC one.
Is the JDBC client running from the same machine as the SQL-PLUS
client? Which JDBC driver are you using?
Joe Weinstein at BEA Systems
.