Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Christian_Lauritzen
Partner - Creator II
Partner - Creator II

Lookup - performance killer

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

LOAD      O_orgno,

               O_name,

                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?

Email: christian.lauritzen@b3.se
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You could try nested ApplyMaps rather than a Lookup, something like:

     ApplyMap('Map1', [Field1], ApplyMap('Map2', [Field2], 'Default'))

(Just guessing, as you have not provided any details what you are trying achieve with the lookup)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You could try nested ApplyMaps rather than a Lookup, something like:

     ApplyMap('Map1', [Field1], ApplyMap('Map2', [Field2], 'Default'))

(Just guessing, as you have not provided any details what you are trying achieve with the lookup)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Christian_Lauritzen
Partner - Creator II
Partner - Creator II
Author

Good suggestion. It turned out to be very much faster. A blink compared to seconds. Thanks!

Email: christian.lauritzen@b3.se