× 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.



David,

IMHO The answer is, as always, it depends. A couple of
years ago a Rochester DB2 expert told me that the
performance threshold between "RPG-Native" and SQL was
about 100 records (<100 records, RPG was faster).

That said there are, of course, many additional factors,
depending on your business needs and requirements (or your
customer's). For example, if the query is very complex I
like to wrap it on a view.

Regards,

Luis Rodriguez

Otherwise, I follow the performance guideline given
--- rpg400-l-request@xxxxxxxxxxxx wrote:



message: 1
date: Tue, 1 Apr 2008 14:27:15 +0200
from: David FOXWELL <David.FOXWELL@xxxxxxxxx>
subject: Wrongly using embedded SQL

Hi,

I've seen a lot of debates about embedded SQL versus RPG.
Couldn't we have some kind of guideline in the WIKI to
help choose between the 2 ?

I have the following problem. I have a file with 4.5
million records. I have to see if a client exists in the
file with a mouvement created at a certain date.
I will create a procedure for this.

Should I use SETLL then READE with the client until I
find the record or should I use SQL ?

What are the reasons for the choice ?

Performance ? I'm not qualified to say which would be
best.
If I did it with SQL, I would also probably try different
requests that I would test with Visual Explain. I mean,
to see if at least 1 line exists, there's SELECT with
FIRST ROW ONLY, COUNT(*) and EXISTS.

Readability ? The same in RPG or SQL. Or depending on
which the following programmer is more used to.

Time taken to do the work? If I only had RPG, the job
would already be done.




Luis Rodriguez

IBM Certified Systems Expert
eServer i5 iSeries Technical Solutions


____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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.