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?
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.
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