What’s the performance of CPYFRMQRYF and OPNQRYF?

220 pts.
Tags:
AS/400
CPYFRMQRYF
OPNQRYF
I would want to know the performance of this 2 commands OPNQRYF and CPYFRMQRYF. I will join 2 files and have some selection criteria. File A has 3000000 record and 1500000 number of deleted record in DSPFD. After that it execute CPYFRMQRYF command. So now the problem is this program take longer time to run. E.g. 2 mins to 30 mins. Why there is big different of processing time?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • philpl1jb

    Performance of the OPNQRYF  would depend on the size of the two files and the choice of the best logical files.  

    And performance is affect by the other processes running on the system and the amount of available memory.

    CPYFRMQRYF depends on the size of the selected file.

    If performance is paramount, this might not be the best way to go.

    54,090 pointsBadges:
    report
  • TheRealRaven
    "So now the problem is this program take longer time to run. E.g. 2 mins to 30 mins. Why there is big different of processing time"

    Longer to run? Longer than what? You only described one set of conditions.

    Are you saying that you had a program that read these two files, and it ran in 2 minutes. But then you added OPNQRYF and CPYFRMQRYF, and now it runs in 30 minutes?

    Then obviously, don't use OPNQRYF and CPYFRMQRYF. The only thing they are doing is adding time to the process.

    Neither command should be used in any new code. They have both been effectively obsolete for 15 years or more. Neither command is being updated by IBM to take advantage of modern changes to DB2.
    24,385 pointsBadges:
    report
  • yeepiyaya
    No. What I mean is my program using these command but the processing time is not consistent. Usually it took around 5 mins to run finish, but sometimes it took 20-30 min.
    220 pointsBadges:
    report
  • yeepiyaya
    Hi philpl1jb, the size of the PF is same for everyday. Just wondering why sometimes it finish in 2 mins, or even worst finish in 20-30 mins. But 20-30 mins not frequently, just happened once per week.
    220 pointsBadges:
    report
  • philpl1jb

    What open option are you using on the OPNQRYF?

    File usage, system usage, system backup's, number of active users/jobs.  Jobs with higher priority. 

    Batch jobs may not become active depending on Queues and Subsystems.



    54,090 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: