× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




-----Original Message-----
From: Brian Piotrowski [mailto:bpiotrowski@xxxxxxxxxxxxxxx]
Sent: Friday, May 05, 2006 8:17 AM
To: Midrange Systems Technical Discussion
Subject: Stored Procedures vs. SQL Statements vs. CHAIN

>Can someone tell me in terms of speed which method would be best when
>working with multiple records?  Right now my code uses a series of SQL
>statements to update several hundred records in one shot.  I'm thinking
>about moving these statements to a stored procedure instead, but I
>wanted to weigh my choices against a good old CHAIN command as well.

Brian,

SQL stored procedure is a fully functional programming language. On the system 
i5 they compile as a C program so there should be no difference in execution 
compared to sql in rpg. The performance hit you might run into is when calling 
into the stored procedure from outside the sql environment.

Disregarding the performance issues of underpowered system i5s, you would be 
wise to code in sql stored procedures vs RPG whenever there is a functional 
equivalence. ( the only thing rpg does better than sql procedures is green 
screen and calling other rpg, cl and java code modules. ) When you code sql 
procedures, both you and your code are portable to other IBM DB2 platforms. RPG 
is not.

-Steve



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.