|
[Paul Conte wrote:] The complete article explains the methodology (which was fairly rigorous) and full results for a variety of tests. Here are a few examples: for bulk inserts, SQL was about 12% faster than "native" RPG IV. For bulk, keyed sequential retrieval of selected columns, SQL was about 3% faster. For direct retrieval of a single row by key, "native" was about 55-65% faster, depending on the number of columns retrieved. For retrieving a set of rows with a common high order key column value (e.g., a customer's orders), "native" was 15-20% faster. ---------- Paul, I don't want to turn this mailing list into a debate about SQL versus native I/O, but it is very important to understand that SQL has its uses. If I'm wrong about SQL performance in a transaction environment, I'd love to know why. If I choose to set myself up as an "authority" by opening my mouth, I should definitely research my statements. To that end, I actually wrote a test program and tried it before I posted my message. Clearly, I'm absolutely astounded that your test results showed bulk inserts faster in SQL. Obviously, there's something wrong with my methodology. Could you point out how I can "fix" the following program to get results closer to yours? I just re-ran it several times and got results similar to yesterday: 14 seconds for SQL, 2 for native. FDATEFILEO E DISK I '1999-01-01' C XCDAT1 I '1999-12-31' C XCDAT2 I 10000 C XCLOOP C MOVE XCDAT1 DATE C MOVE XCDAT2 DATEA C MOVE '010799' DATA C* C TIME TIMES1 60 C* C 1 DO XCLOOP C/EXEC SQL C+ INSERT INTO DATEFILE VALUES(:DATE, :DATEA, :DATA) C/END-EXEC C ENDDO C* C TIME TIMES2 60 C* C 1 DO XCLOOP C WRITEDATEREC C ENDDO C* C TIME TIMES3 60 C* C MOVE *ON *INLR Thanks a million! =================== Joe "Zappie" Pluta www.zappie.net/java "Where the AS/400 speaks Java with an RPG accent" =================== +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.