Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

stored procedures v/s sql statements

843859Oct 13 2005 — edited Oct 14 2005
i have written a simple program to update salaries of faculties from a database in sybase .i have used jdbc .i have imjplemented this in two ways.
the aim is to raise the salaries by 1% till it becomes 40000 ,after which u roll back the transaction.
1)by using a single update statement...and using roll backs and savepoints all in the java code
2)by writing stores procedure..and implementing the logic in the stored procedures..

i finally used the TPPT tool to compare the execution results ..
i found that implementing the code using stored procedures was slower than using a single update statement..Shoudnt stored procedures run faster than using a update query thru java code?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2005
Added on Oct 13 2005
2 comments
114 views