|
David, My question is: Why would you want to do that? RPG was designed to give simple, efficient data base access. The simplicity is in the way you specify HOW things should be done through simple operation codes (or even without operation codes, if you dare to use the cycle). The efficiency is achieved by opening every file once for every program. SQL was designed to give powerful data base access. The power is in the way you specify WHAT you want to be done, leaving the HOW to smart middleware (the optimizer). To achieve this power, some efficiency had to be sacrificed. All necessary files have to be opened and closed for every action. True, there are cases where SQL is definitely quicker then RPG; true, IBM has worked hard to close the gap between SQL and 'native' data base access. But for single record access RPG is a far more suitable tool than SQL. Joep Beckeringh ----- Original Message ----- From: <dmosley@dancik.com> To: <RPG400-L@midrange.com> Sent: Monday, June 11, 2001 4:32 PM Subject: Question about SQL performance vs. RPGLE performance > > I'm curious. I've seen performance results of SQL vs RPG, when using > thousands of records. But I'm just curious if there is a signifigant > performance difference when accessing only one record. > > Heres my scenario : > > I've created a *SRVPGM program(with multiple procedure calls) that will > access a database record, and do what ever with it. > - Some of the Procedure calls are to @dspXX0003F, @addXX0003F, > @dltXX0003FRrnDsp, @rtvXX0003FRrn, etc..... > (XX0003F is the file name) > > And so what I've done rather than using CHAINS, EXCEPTS, WRITES, I've > replaced them with embedded SQLs. The performance appears to be the same, > except for the first access, maybe a couple of seconds to prepare, but > after that, it flies. > > This is all in test, and I was curious if anyone else performs database > maintenance/access like this, and if so how's the performance. > > > David L. Mosley, Jr. > Systems Analyst > 2000 CentreGreen Way > Suite 250 > Cary, NC 27513 +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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.