ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Very long deleting records from journalled files

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

  • Very long deleting records from journalled files

    Hi *,
    our admin asked us (programmers) few days ago, why one of our jobs lasts for hours on production machine.
    I checked it and this job is very simple - it only deletes (using sql) records from few phisical files. Command is very simple: delete from XXX where some_date < given_date (CYMD format).

    I prepared about 18*10^6 records on test machine and tried to run this job. It executes about 4min without journalling on files, but with journal it grows up to 83min. Is it normal, that the difference is so big between journalled/not journalled files?

    I don't manage production area and have no idea, if these files should be journalled or not. The fact is, that they are and that once a month should be cleaned of old records...

    The first thing, I wanted to do, was to execute ENDJRNPF when this job begins and STRJRNPF when job ends. I don't need a journal for records, which are deleted. But I'm not sure, if it's a good idea (maybe there's some process which checks files and if there are some not journalled, it starts journalling).

    Can I use some parameter (in sbmjob or in pgm compilation or on files level) to make this deletion faster?​

  • #2
    If you end jpurnaling, then other file activity that happens at the same time won't get journaled.

    Comment

    Working...
    X