Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ramonarcusa36
Contributor III
Contributor III

Mapping and optimized loads

Hey guys.

I've always read and heard that it's better using ApplyMap than Join, whenever it's possible. I've tried to substitute some Joins which seemed to be perfect candidates for Mapping. However, after using mappings it takes my script much longer to run. I feel like it's not optimized anymore.

Does that make any sense to you?

It that's how it works, I guess I should only use ApplyMap instead of Join when I'm already running an unoptimized load. Right?

Thanks in advance.

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

manipulations to a load (i.e. other than load *) will end up making the load un optimized.

Applymap is definitely faster than join in a standalone scenario.
you can try loading from qvd into a temp table and then resident loading that one to do apply map. this may be faster than a join in some scenarios and not in some other

but overall the idea is to use best/fastest approach for specific business scenario / logic.
Brett_Bleess
Former Employee
Former Employee

The only thing I have that may help is the following Design Blog post on the subject, hopefully that may provide you the info you need to decide in this use case which way is the better way to go!

Join versus Apply Map

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
jerrysvensson
Partner - Specialist II
Partner - Specialist II

It depends.

If your ApplyMap contains a lot of rows and your source is a qvd file.

A join could be faster, since mapping load is not optimized and depends on how fast your disk is.

I have encountered this and my reloads got a lot faster using join instead of ApplyMap(). 

Compare both solutions if you have time.

jonathandienst
Partner - Champion III
Partner - Champion III

AFAIK a join is not optimized. Optimized loading refers to a very fast loading from a QVD into a table with minimal transformation. If you are doing it with a join, the actual load step may be optimized (if loading from a qvd), but a join is just a join.

A mapping load is never optimized. This means that there are scenarios where a normal join may be faster than building a mapping table and using ApplyMap() -- especially is the mapping table is very large and used only once. There are reasons for using an applymap other than speed, of course (no doubling, filling in default values etc).

This is a case for testing both scenarios to determine which works best for you.

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