Page 1 of 1

runqry command running too slow

Posted: Mon Sep 23, 2024 8:16 pm
by jbgp70
Hello! Hope someone can share any insight on this issue.
When a user runs an option from her system menu which executes a CL, it takes much longer than expected. The CL runs 3 queries interactively, the second qry which creates a file of about 162k records, is the one that takes too long, it takes more than 20 minutes to complete.
The first 2 query's generate one file each into QTEMP lib, which are used by the 3rd qry.
The issue started about 2 months ago.

This is part of her profile's setup:
User class . . . . . . . . . . . . . . . . : *USER
Special authority . . . . . . . . . . . . : *JOBCTL
(when I started to analyze the issue, this parameter was *none, but I changed it to *JOBCTL as per a recommendation I found on the internet, but didn't work)

The weird thing is when I execute that process under my profile, it takes about ONE minute to complete. It runs the same qry's and generate the same volume of records. This is my profile's setup:
User class . . . . . . . . . . . . . . . . : *PGMR
Special authority . . . . . . . . . . . . : *ALLOBJ
*JOBCTL
*SECADM

Could someone advise if there's a way to reduce the execution time for my user?
Thanks a lot!

Re: runqry command running too slow

Posted: Sat Sep 28, 2024 6:30 am
by Scott Klement
I think to reasonably do anything to solve this problem, you need to know what is taking up the time.

I would suggest debugging the code and seeing which line of code takes so long. If it is an SQL statement, run it under Visual Explain (from her user profile) so that the OS can tell you what is taking the time.

I don't understand why you are posting authority info. What does authority have to do with how long it takes to run?