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