Array size limit

 5 Replies
 1 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Ragu Raghavan
Veteran Member
Posts: 476
Veteran Member

    In my flow, I need to lookup a custom table outside the Lawson schema for each transaction. The SqlQry takes a long time. I wonder, if I can do a single qry at the beginning and load the results of the Sqlqry into an Array, avoiding the multiple lookups. Catch is that there are likely to be 50,000 records in the custom table. Will that cause the LM server to crash? Are there any limits to how big the array can be? Thanks.

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      I think that's an excellent solution and the system should have no problem with the size of your array.
      http://consultdavidw.blog...eference-lookup.html
      David Williams
      Ragu Raghavan
      Veteran Member
      Posts: 476
      Veteran Member
        Thanks David
        John Henley
        Posts: 3353
          I use similar approaches with multidimensional arrays to store key/value lookups and can offer this advice. 1) be careful how much you store per row. Don’t try to store a whole bunch of columns just what you need. 2) multidimensional arrays are not very easy to maintain within a flow. The person who comes along after you may not be as smart 3) don’t expect a silver bullet. Execution time may not substantially improve since another factor may be limiting.
          Thanks for using the LawsonGuru.com forums!
          John
          Ragu Raghavan
          Veteran Member
          Posts: 476
          Veteran Member
            Thanks for the warning, John.
            Ragu Raghavan
            Veteran Member
            Posts: 476
            Veteran Member
              That seems to have worked out well. 17K look ups replaced by 1 lookup and populate array: reduced elapsed time from 1hr+ to about 11 minutes