The moose likes JDBC and Relational Databases and the fly likes Speed Up JDBC Process with Oracle and Sybase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Speed Up JDBC Process with Oracle and Sybase" Watch "Speed Up JDBC Process with Oracle and Sybase" New topic

Speed Up JDBC Process with Oracle and Sybase

Alan Kwok

Joined: Mar 14, 2002
Posts: 7
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
conOracle = DriverManager.getConnection("jdbc racle:thin:@","testuser","testuser");

// Create connection for Sybase database
conSybase = DriverManager.getConnection("jdbc:sybase:Tds:","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

Joined: May 26, 2003
Posts: 33119

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Alan Kwok

Joined: Mar 14, 2002
Posts: 7
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!

I agree. Here's the link:
subject: Speed Up JDBC Process with Oracle and Sybase
It's not a secret anymore!