
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lookup vs Applymap
Hello,
Can anyone explain why Applymap function is faster than Lookup function ?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
