stored procedures v/s sql statements
843859Oct 13 2005 — edited Oct 14 2005i 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?