Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Tanish
Partner - Creator
Partner - Creator

Lookup vs Applymap

Hello,

Can anyone explain why Applymap function is faster than Lookup function ?

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Lookup() has more parameter as applymap() and could look into each table including the currently loaded one. The description within the provided link just explained the performance-impact but not really the cause.

I don't know how it's technically implemented but I wouldn't be surprised as if an applymap() worked like an exists() against the symbol-tables and doesn't break the load-execution while lookup() is applied against the data-tables and may be evaluated separately for each single record.

Beside this is the usage-hint within the description not the whole truth because applymap() could be used with combined and/or sorted fields and also horizontally + vertically nested with a bit advanced scripting. Therefore, there won't be much scenarios in which joins or lookup() are necessary or having a benefit against a mapping.

- Marcus

View solution in original post

2 Replies
_Iswarya_
Contributor III
Contributor III

Hi @Tanish ,

ApplyMap() is more practical since:

  • even though you have to load the table, it will be dropped automatically.
  •  it makes code easier to understand
  • Executed on the distinct values only, not per table record.

Pls find the link below:

https://support.qlik.com/articles/000042949

marcus_sommer

Lookup() has more parameter as applymap() and could look into each table including the currently loaded one. The description within the provided link just explained the performance-impact but not really the cause.

I don't know how it's technically implemented but I wouldn't be surprised as if an applymap() worked like an exists() against the symbol-tables and doesn't break the load-execution while lookup() is applied against the data-tables and may be evaluated separately for each single record.

Beside this is the usage-hint within the description not the whole truth because applymap() could be used with combined and/or sorted fields and also horizontally + vertically nested with a bit advanced scripting. Therefore, there won't be much scenarios in which joins or lookup() are necessary or having a benefit against a mapping.

- Marcus