QSDA study materials
QSDA study resources

QSDA: Performance Optimization: Script Tuning, Data Volume Reduction, Calculation Efficiency, QVD Usage

QSDA · Work through your exam, one topic at a time.

All guide sections

Performance Optimization: Script Tuning, Data Volume Reduction, Calculation Efficiency, QVD Usage

Reduce first, calculate second

Performance problems in Qlik are almost always volume or granularity problems. Drop fields you never use (DROP FIELD), keep fact tables at the grain the charts actually need, and persist intermediate results as QVDs. A QVD loaded without transformation - only RENAME FIELDS, DROP FIELDS, or a WHERE EXISTS on a raw field - takes the optimized path and streams rather than parsing row by row. Any function applied to a loaded field, or an ORDER BY, forces the slower path.

In the UI, the cheapest expressions are the ones the engine can cache: set analysis (Sum({<Year={$(vYear)}>} Sales)) is evaluated as a static selection and beats If(Year=..., Sum(Sales)), which is row-level. Precompute flags in the script (IsCurrentYear, IsActive) rather than writing If() chains in charts. Avoid Count(DISTINCT) on high-cardinality fields, uncontrolled Aggr() over large tables, and charts carrying many dimensions.

Structural costs hide too: synthetic keys duplicate data, JOIN on non-unique keys multiplies rows, and snowflaked dimensions add hop-by-hop work. Only load the columns you need from a source, and filter early rather than dropping rows after a join.

Rule of thumb: if a chart feels slow, ask whether the number can be computed once in the script and stored as a field. A lean fact table with precomputed flags beats expression tuning almost every time.

Worked example: replace the chart expression Sum(If(Status='Open', Amount)) with a script field loaded as If(Status='Open', Amount, 0), so the chart becomes a plain Sum(OpenAmount) that the engine aggregates efficiently.