By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,885 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,885 IT Pros & Developers. It's quick & easy.

Can Java Store Procedure increase performance?

P: 2
Can Java Store Procedure increase performance

Performance reason we need to move some of our code into database. Java Store Procedure is given the first choice. However, while investigating some sample code of Java store procedure, PreparedStatement seems to be a must, such as PreparedStatement pstmt = conn.prepareStatement(sql); ..., pstmt.close() in the end.

My question is that if the prepareStatement(sql) is called each time when the Java Store Procedure is called, will the prepareStatement() lose it's original meaning of compiled once and running many times to increase performance? If the prepareStatement(sql) is not going to be called each time, will pstmt.close() actually does anything?

In other words, can Java Store Procedure really provide some performance by running inside database? If so, is there some sample code that does not contradict to general common sense?

Thanks in advance for your time and help you may provide.

Sep 14 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.