|
On Jun 25, 2025, at 5:41 PM, Reeve <rfritchman@xxxxxxxxx> wrote:
...lack thereof, actually. It's really slow--does DSPJRN know something
SQL doesn't? Or is it me?
DSPJRN inserts 300,000 records from the current receiver into a file in 10
seconds while the same task in SQL drags for 40 seconds or more before any
(a few hundred) results are available. The journaled files are extremely
busy, with the majority of the transactions (writes, a gazillion updates)
against today's orders. The journal receiver is 2.5 GB with about
10,000,000 entries (lots of journaled access paths). I have not
benchmarked the QjoRetrieveJournalEntries API.
Do we pay a performance penalty for the convenience of SQL access? I'm
grateful for any suggestions that will improve performance (mine or the
code's).
--reeve
Fast:
DSPJRN JRN(AAJ001) FILE((FRP001) (FRP002) (FRP003))
FROMTIME(062525 000000) JRNCDE((R)) ENTTYP(DL PT PX UB UP)
PGM(FRR010) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE2) OUTFILE(QTEMP/XXXX)
Slow:
SELECT journal_code AS "Code",
journal_entry_type AS "Type",
entry_timestamp,
*CAST*(entry_timestamp AS *DATE*) AS "Entry date",
*CAST*(entry_timestamp AS *TIME*) AS "Entry time",
object,
object_type,
user_name,
program_name,
commit_cycle,
entry_data
FROM TABLE (
qsys2.display_journal(
journal_library *=>* 'LTL400V310',
journal_name *=>* 'AAJ001',
starting_receiver_name *=>* '*CURRENT',
journal_codes *=>* 'R',
journal_entry_types *=>* 'DL,PT,PX,UB,UP',
object_library *=>* 'LTL400V313',
object_name *=>* 'FRP001,FRP002,FRP003',
object_objtype *=>* '*FILE',
object_member *=>* '*FIRST'
)
) AS x
WHERE *CAST*(entry_timestamp AS *DATE*) >= '2025-06-25'
AND program_name = 'FRR010'
ORDER BY entry_timestamp;
Thanks/.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.