Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

wizardo
Contributor III

count or sum - is there a difference in performance?

Hi,

a General question.

I was wondering  is there a difference in performance in the layout (qlikview and/or  sense)

when using the count function vs using the sum function

E.G.

will doing: count([Customers that left])

be faster then

doing sum([Customers that left flag])

where ([Customer that left flag] is either 1 or 0

what do you think?

Daniel

2 Replies
MVP
MVP

Re: count or sum - is there a difference in performance?

rodri_morales
Contributor II

Re: count or sum - is there a difference in performance?

Yes, there is a difference in performance.

Is better use a SUM function of 1, than count. So, as you explain, is better to do SUM(ClientLeftFlag) than COUNT(ClientLeft), asuming that ClientLeftFlag is 1 when the client is no client anymore.

Sometimes we can't apreciate the difference in performance, due to an application with few rows. But when you work with really big applications, you would notice that difference. Also is a good practice to do it, unless you know the performance won't be affected.