Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Speed Up JDBC Process with Oracle and Sybase

 
Alan Kwok
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have encountered the following problem which I hope y'all good folks could help me out on. I have recently written a JDBC program that will call a stored procedure (via CallableStatement) in Oracle, return some data into the program, then pass all these data into a stored procedure in Sybase. The stored procedure in Sybase will return some values on which the program validates and then calls another stored procedure in Oracle to update several tables in the database. My program works so far but it is taking a long time to perform one single operation, I'm just wondering if there is a way I can speed up this process without doing anything in the backend like creating indexes on the Sybase database or so.


// Create connect for Oracle database
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
conOracle = DriverManager.getConnection("jdbc racle:thin:@13.123.2.21:1521:tstoracle1","testuser","testuser");

// Create connection for Sybase database
Class.forName("com.sybase.jdbc2.jdbc.SybDriver").newInstance();
conSybase = DriverManager.getConnection("jdbc:sybase:Tds:13.123.1.143:4100/tstsybase1","testuser","testuser");


I have quoted the code I used to establish connections to the databases, please let me know if you would require more information. Thank you very much in advance.

Regards... Alan
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alan,
Welcome to Javaranch!

I would suspect that most of the time is being taken up in the stored procedures themselves or the network. You can test this by putting some log statements in your Java code.

It is unlikely that you will be able to get a significant performance boost without touching something on the database.
 
Alan Kwok
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Jeanne. I have followed your advice and have tracked down the problem which resides on the Sybase stored procedure itself. I will explore more on how to streamline the stored procedure. Thanks again!

Alan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic