Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create 2 fields with the exact same data (for different transformation later), and I can think of 2 ways of doing so:
Load Script 1:
Load
applymap ('map_table1', map_field1) as field1
applymap ('map_table1', map_field1) as field2
From [C\...] (qvd);
Load Script 2:
Load
*,
field1 as field2;
Load
applymap ('map_table1', map_field1) as field1
From [C\...] (qvd);
Which load script would run faster? Would there be any difference between the results of the 2 load scripts?
the one with 2 applymap
the one with 2 applymap
Another approach could also be
MAP field1, field2 USING map_table1;
Load
map_field1 as field1,
map_field1 as field2
From [C\...] (qvd);
I've learned to be cautious with general answers to performance questions. It may depend on different properties of the data set.
Just test with your own data.
Perform the load test couple of times and you will get the which script get better.
I think Script 2 works fast because you have only one mapping load.