ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

qjoretrievejournalentries API vs SQL display_journal

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • qjoretrievejournalentries API vs SQL display_journal

    Do colleagues have experience comparing usage performance sql display_journal vs system API Qjoretrievejournalentries?
    Does anyone know how IBM actually accesses the journal when we use SQL display_journal?
    If SQL display_journal uses storage procedures, are they written in C or Java?



  • #2
    I did a program that tested both approaches and my results.
    1. SQL is definitely slower than reading directly by using an API + RPG.
    2. Worst result for SQL 2000x slower (200000%) than API. When reading 2 entries, for multi-file condition, in the case of sparse journal entries.
    3. Best result for SQL 3x slower than API. When reading 2,000 entries, for a large number of journal entries.
    4. There is an upper limit on the number of entries read for a SQLRPGLE compilation. For me it was 5000 entries - it's about exceeding 16MB.
    5. For complicated cases, reading through SQL did not finish. For the same conditions, reading through the API took fractions of a second.
    I hope that because I needed such knowledge, maybe other colleagues will be able to take advantage of it.

    Comment


    • #3
      How were you running the SQL? Manually via Run SQL Scripts,, or embedded SQL in an RPGLE program?

      Comment


      • #4
        Embedded SQL in an RPGLE program

        Comment

        Working...
        X