ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Trying to run big SQL script from IFS, using RUNSQLSTM

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

  • Trying to run big SQL script from IFS, using RUNSQLSTM

    Hi!


    First time publishing here. Thanks for your ideas!

    I'm trying to run a big SQL script.
    It is composed by INSERT sentences. About 500.000.
    Just to try one way to migrate one file into iSeries, from another DB.

    It's ok, if the file is smaller.
    But, when I try to run RUNSQLSTM, taking the file from IFS, it takes a long time to start.

    I see the job is working (more than 50% of CPU), but, nothing happens in the first minutes.


    Do you what I'm doing bad?
    Is there any way to accelerate the process?


    I've changed some parameters on RUNSQLSTM:
    MARGIN: I've put the line size in the script file.
    Commit: *NONE


    Thanks!!!

  • #2
    Re: Trying to run big SQL script from IFS, using RUNSQLSTM

    Its probably looking at the current indexes and possibly building new ones to bet fit the statements. 500 insert statements does not sound too large. I would run this in batch too. Better performance.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Trying to run big SQL script from IFS, using RUNSQLSTM

      Thanks for your answer!

      My test was just for a file without indexes, neither primary key, views,...

      And yes, I forgot to tell that it was a submitted job.

      And, it is 500,000 INSERT sentences. (sorry, I confused point with comma)

      Originally posted by DeadManWalks View Post
      Its probably looking at the current indexes and possibly building new ones to bet fit the statements. 500 insert statements does not sound too large. I would run this in batch too. Better performance.

      Comment

      Working...
      X