left join (GS)
if([Sequence Number]>1, 'Company', 'broker') as [ Type],
len( [Email Adrress]) as [Email Length]
WHERE ([ Year] >= $(vFromYear) and [ Year] <= $(vToYear));
drop table TmpTable;
Optimized load is where you pull data from a qvd without any transformation or where clause in it.(basically data processing). Aliasing is an exceptional to this.
So if you want it to be optimized push the calculations to the place where you are creating the QVD files, should be your exctract. But to have it handles at extract or a different transform layer should be decided with the dandwidth you have between Qlikview and DB. and the DB should support the transform Queries.
This is something that needs to be tested out.
load from resident --> not optimized (only from qvd)
if function --> not optimized
len function --> not optimized
where clause --> not optimized
see here, steve (stevedark) has a good article about optimized load