2 Replies Latest reply: Apr 1, 2014 3:13 AM by Christian Lauritzen RSS

    Lookup - performance killer

    Christian Lauritzen

      Below is a query where I used Lookup (despite warnings) to find the first value from the field FName.


      LOAD      O_orgno,


                      ApplyMap('Company_OrgnoChange',F_orgno) as F_orgno,

                      ApplyMap('Company_NameChange',F_orgno,Lookup('FName','FOrg',F_orgno,'tmpLookup')) as F_name

      Resident Final1 where isnull (KeepNames) and F_orgno <> '#Missing#';


      And yes, it is SLOW... very much so.


      How could I rewrite the load statement so it is fast, I guess not using Lookup?