|
Try using native I/O in RPG programs and returning array result sets. Also, if this RPG program (stored procedure) is designed for repeated calls, do not close files on exit. SQL/400 can be made to perform but in that case more details, such as SQL statements themselves and the list of DB indexes for the related tables, would be required. One call is always better than 15 calls. You can find examples of using array result sets in "Stored Procedures and Triggers on DB2 Universal Database for iSeries" Redbook. Lo > -----Original Message----- > From: Suresh Kumar [mailto:suresh@xxxxxxxxxxxxxxxxxx] > Sent: 27 March 2003 16:54 > To: java400-l@xxxxxxxxxxxx > Subject: RE:SQL Insert > > > Hi Dieter, > This is the statistics: > 1. We do about 25 SQL statements against 4 tables. > > 2. All the tables are small (about 100 records/table) except > one which has about 10,000 records. > > 3. Ultimately we end up getting about 60-70 records from > these tables which is needed for processing by the servlet > (at the App server). > > 4. I have 2 questions in connection with this: > a. In the stored procedure (written in RPGLE), we are > basically peforming various SQLs and returning the result set > cursor back to the Java client program. This RPG program > declares the cursors (SQLs), open the cursors and return > them: all together about 15 result sets. Other option is to > call the RPG program repeatedly so that it will send back > proper cursor one at a time. Which will be faster?? > > b. Also, is it faster with array result sets as opposed to > cursor result sets?? How can the client read an array result > set in the Java servlet? > > Suresh > >
As an Amazon Associate we earn from qualifying purchases.
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.