PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11/29/2019 4:30 PM by  Ragu Raghavan
Array size limit
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Ragu Raghavan
Private
Private
Veteran Member
(1019 points)
Veteran Member
Posts:355


Send Message:

--
11/26/2019 1:55 PM

    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
    Private
    Private
    Veteran Member
    (3223 points)
    Veteran Member
    Posts:1085


    Send Message:

    --
    11/26/2019 2:11 PM
    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
    Private
    Private
    Veteran Member
    (1019 points)
    Veteran Member
    Posts:355


    Send Message:

    --
    11/26/2019 2:25 PM
    Thanks David
    John Henley
    Private
    Private
    Senior Member
    (9740 points)
    Senior Member
    Posts:3264


    Send Message:

    --
    11/26/2019 2:27 PM
    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
    Private
    Private
    Veteran Member
    (1019 points)
    Veteran Member
    Posts:355


    Send Message:

    --
    11/26/2019 2:37 PM
    Thanks for the warning, John.
    Ragu Raghavan
    Private
    Private
    Veteran Member
    (1019 points)
    Veteran Member
    Posts:355


    Send Message:

    --
    11/29/2019 4:30 PM
    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
    You are not authorized to post a reply.