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



I would look at the wider picture, not just at the program you are currently considering.

What effect will this joined logical have on those programs which add-to / update / read the 5 physicals?

The MAINT (immediate, delay, rebuild) parameter may also have an impact.


Regards,
John McKay


----- Original Message ----- From: "sjl" <sjl_abc@xxxxxxxxxxx>
Newsgroups: midrange.rpg400-l
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, September 18, 2008 1:25 PM
Subject: Re: Joins vs. explicitly reading multiple files


James wrote:
Consider 2 scenarios (both using native Record Level Access):
Scenario A: We read from a join-logical with 5 different based-on
physicals
Scenario B: We read from the 5 based-on physicals individually, either
directly or using simple logicals.

In terms of performance, is there any reason to prefer one over the other?


James -

IMO, It really depends on what data you are needing at any given point in
the program. If there is complex logic in the program based on data
retrieved from one of the files (like a master record) and all you need is
data from one of the 5 files to make that decision before drilling deeper,
an I/O to just the record that you need is less expensive in terms of
resource usage if there is logic that would bypass the retrieval of any of
the other 4 records.

One the other hand, using the joined logical file would probably make the
program easier to maintain, so unless 1) you're processing millions of
records or 2) you need to update a record, I would probably use the joined
logical.

Regards,
sjl



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.