Académique Documents
Professionnel Documents
Culture Documents
QlikView 11
Qlik Engine
client
Row-based
QlikView 12
client
QIX Engine
Qlik Sense
Columnar + client
some other optimizations
2
The Seven Principal Engine Components
Logical
Authorization Inference
Engine
QIX
Script Calculation
Data Internal
Engine Engine
Database
Export Rendering
Features Engine
3
What happens during the script execution?
SQL SELECT * FROM Orders;
Read record by record from source
Create or Append to Data table
Create or Append to Symbol tables
The script execution is
SQL SELECT * FROM [Order Details]; sequential
Read record by record from source
Create or Append to Data table
Create or Append to Symbol tables
Data Symbols
Script Calculation
Engine QIX Engine
Internal Database
Export Rendering
Features Engine
6
Implications of Symbol tables
• Many distinct values in a field ► Longer bit-stuffed index and more rows
in the symbol table (more RAM usage and more CPU usage)
• Long field values ► Longer values in symbol table (more RAM usage)
7
Colors and States
• Two Flags:
– Every field value is either Selected or Not Selected
– Every field value is either Possible or Not Possible
• These two state flags are independent of each other
State
Selection
State
8
Colors and States II
11
The Seven Principal Engine Components
Logical
Authorization Inference
Engine
Data Symbols
Script Calculation
Engine Engine
State
Cache
Vectors
Export Rendering
Features Engine
12
Logical Inference
2. Aggregations
in
Transient
Hypercubes
(Objects)
1. Logical inference
On
Data model
QIX
Internal Database
14
Multithreading
One or One thread Several threads
several per object per chart
th r e a d e d !
List box Single
-
threads
s i b l e b o le-neck!
tt
per user Po s
Selection Chart
Chart
15
The Calculation Engine and State Vectors
The Calculation Engine calculates most objects,
which contain expressions with aggregation
functions.
• Aggregatons are functions that loop over the
possible (State=1) rows in the Data table:
Count(), Sum(), Avg(), Concat(), Only(), Min(),
Max(), etc.
• Some system functions use the Symbol tables
and their state vectors: GetSelectedCount(),
GetPossibleCount(), GetExcludedCount(),
etc.
16
How does the Calculation Engine work?
• Sum( Quantity ) = ?
– Answer: 10. Calculated (aggregated) in the Transactions table.
• Count( Product ) = ?
– Answer: 2. Calculated in the Products table.
le ti me s in g le -th re a d ed!
• Sum( Quantity*ListPrice ) = ? Considerab
– Answer: 42. Pos+ s4*5
( 1*3 + 2*5 + 3*3 ) bottle-neck!
ible
Calculated in a temporary table: Transactions U Products.
17
How does the Calculation Engine work?
• The QIX Engine determines which table to use for the
aggregation
18
The Calculation Engine oddities
– For performance, you may consider moving a number to the ”correct” table, so
that the creation of a temporary table is avoided.
20
Set Analysis
• Set Analysis is merely an additional set of state vectors, created by
the Logical Inference Engine
21
Set Analysis
Sum( Sales )
– Aggregate over the records, using the normal state space
22
Set Analysis
23
Set Analysis
24
Set Analysis
25
Set Analysis
26
Set Analysis
27
Set Analysis
28
Set Analysis
29
Set Analysis
30
Implications of Set Analysis
• Set Expressions are evaluated by the Logical Inference Engine,
to create an alternative state space.
• It is done before the aggregation made by the Calculation
Engine. Hence, a Set Expression cannot be evaluated row-by-row
in the chart.
31
Set Analysis
4
*Sum( {$<Month={"<=$(=Max(X))"}>} Sales )
Order of events:
1. Dollar expansion
2. Parsing of expression
3. Set Analysis expression evaluation
4. Cube expansion and aggregation
32
The Seven Principal Engine Components
QlikView® C-client:
Logical
Authorization Inference - All rendering is Client-side
Engine
QlikView® Ajax:
QIX
Script Engine Internal
Calculation - Tables are rendered client-side
Engine
Database - Graphs are rendered server-side
Export Rendering
Features Engine Qlik® Sense:
- All rendering is Client-side
33
Questions & Answers
Thank You