Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mwallman
Creator III
Creator III

Qlik Performance: What does it mean when someone says "Single Threaded" operations and Multi-Thread?

Hi all,

In Qlik what does it mean when someone refers to single threaded and multi-threaded operations?

What are some examples of each?

Which one is recommended for good performance? And which one is to be avoided?

5 Replies
dplr-rn
Partner - Master III
Partner - Master III

Multi threaded operations will use all the available CPU cores in your machine (i.e. multitask to perform your calculation faster). While single threaded will only use 1 core so the calculation becomes sequential.

Generally all qlik functions are multithreaded.
Ones to typically avoid are if conditions e.g.
if(Year=2017, sum(Sales)) - qlik will need to go through each line in your fact table to validate the if condition and then sum it. this may result in a single threaded operation
instead use set analysis like sum({<Year={'2017'}>}Sales) which will be much faster and definitly more efficient and recommended way to approach it
marcus_sommer

In an addition to the statement from  dilipranjith most of the calculations are multi-threaded but there are exceptions like building the virtual tables (each object in Qlik is a virtual table on which the measures are performed) or using aggregation-loads in the script.

- Marcus

mwallman
Creator III
Creator III
Author

Hi Marcus,

I read somewhere about how a user interface table, if it's made up of dimensions from different tables in the data model can be performance heavy?

Or that if you do something like Sum(Sales * Quantity - PurchasePrice) where all three fields are from separate tables it can be a detriment to performance.

Views on that?

dplr-rn
Partner - Master III
Partner - Master III

A dimensional data model or star schema gives the best performance.

so in answer to your Dimensions from different tables are generally not a problem if data model is a star schema. more number of connections there are from main table 

e.g.

you want a sum of sales as measure and region as dimension

if your datamodel is salefact--> customer--> customerregion (a snowflake like schema) will be perform less well than salesfact-->customer (a star schema)

but that depends on volume of data too. if data size is low it wont make too much difference but ideal is star schema

check attached pdf i found long back from somewhere. it is for qlikview but principles remains same

 

marcus_sommer

Although Qlik is very forgiving in regard to create a working datamodel it's important to follow the best practices (see the suggestions from dilipranjith) to get a good compromise in script & UI performance, maintainability and usability - and only if you experience any issues it makes sense to optimize it in one or the other direction.

- Marcus