Quick Tips #14 - Reloads
On MonthName() and DayName() in the load script:
Reloading data in QlikView can be slowed by the use of methods that doesn’t scale well over cores. This can for some functions be avoided with rewriting them using better optimized ones.
Two such examples are MonthName() and DayName(). If they are used in a load script then the entire load will be slower and scale less optimized than it has to be.
Both functions can be replaced by more scalable functions:
- Dayname() can be replaced with TimeStamp(Floor(<Your Timestamp>), 'YYYY-MM-DD')
- MonthName() can be replaced with date(<Your Timestamp>, 'MMM YYYY')
These two functions are not as time consuming within the user interface of a QlikView application as an expression, due to caching, and does not have to be avoided there as in the load script.
QlikView improvement in 11.20 SR2 (and onwards) no longer requires workarounds as denoted above.
On the rand() function in the load script:
The script generated by pressing CTRL-q twice relies heavily on the rand() function and will generate data on the fly rather than actually loading it from a source. Do not use CTRL-q code or rand() when performing benchmarks of reloads, as rand() will not scale well over cores.
Cheers from the Scalability Team