vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| if I have 1000 cobol insructions running in batch, and I have 1000 cobol instructions running in a store procedure, which one will be more efficient (execute faster) or there is no difference. and in this questions no db2 sql, simply cobol instructions!!!! |
| |||
| Generally, running SQL inside a stored procedure is the fastest way to process instructions - as the SQL is running inside the database engine - there is nothing going over wire/tcpip. Even if you have compiled (external) COBOL Stored Procedures - although external, they are running right beside the database engine - so will be faster then an alternative running SQL over wire. Gary wrote: > if I have 1000 cobol insructions running in batch, and I have 1000 > cobol instructions running in a store procedure, which one will be more > efficient (execute faster) or there is no difference. and in this > questions no db2 sql, simply cobol instructions!!!! |
| ||||
| The COBOL would run at the same speed, the difference would be in the overhead of getting to the code. In batch, everytime you execute it, all it does is a simple branch & link - calling the same code as a stored procedure would have all the overhead of passing through db2, then getting the results back etc. - I had a series of programs that I coded as DB2 functions - which were called hundreds of thousands of times and they ran real slow. Converting the application to COBOL batch file processing calling COBOL suboutines made the whole process run much much faster... - It really depends on how often you want to call it, and where else you may want to call it from in the future. As a stored procedure, you can call it from a java web app - something you can't do with a COBOL subroutine. But then again if you're only passing back output parameters - the same code could be called as either a subroutine or a stored procedure. Bill "Gary" <guri420@gmail.com> wrote in message news:1155931547.679251.130350@m79g2000cwm.googlegr oups.com... > if I have 1000 cobol insructions running in batch, and I have 1000 > cobol instructions running in a store procedure, which one will be more > efficient (execute faster) or there is no difference. and in this > questions no db2 sql, simply cobol instructions!!!! > |