Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

text or numerical using in conditions

Hi Qlik Community,

Would you please advise whether is difference on performance what using in conditions text or numerical?

I might be great if updated documentation somewhere is.

This below is just an example but let's suppose millions of rows.


data:

LOAD * Inline [

field_code, field_name, value

1, name, 100

];

sum({<field_code={'1'}>} value)

sum({<field_name={'name'}>} value)

10 Replies
Highlighted

Few people who might have an idea or two about this would be

pcammaert

rwunderlich

hic

troyansky

Highlighted

As per rules from my architect and Data scientist notified Numeric is bit efficient rather than String which called "String storing considering Byte with each character where number is only one byte". this is what i got comment from them

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted

Hi Max,

This post should give some insights...

String Key vs Integer Key -- any difference in link performance?

Aside from delivering a more compact data model, I seem to remember Stephen Redmond mentioning somewhere that sequential integers may do away with the symbol table altogether. I've never experienced that the document becomes much quicker, let alone when set analysis prepares a reduced data set.

Highlighted
Creator II
Creator II

Thanks everyone for response.

Highlighted
MVP & Luminary
MVP & Luminary

In my testing, there is no difference in String vs Numeric performance in a set analysis modifier. Both of these would perform the same:

sum({<field_code={1}>} value)

sum({<field_name={'name'}>} value)

In other contexts, such as an if(), numeric comparisons are significantly faster.

sum(if(ExpressShipNum=1, LineTotal))

is much faster than:

sum(if(ExpressShipText='Yes', LineTotal))

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Highlighted
Creator II
Creator II

Thank you for experience sharing.

Highlighted
MVP & Luminary
MVP & Luminary

I can repeat what Rob said - no difference in Set Analysis and a lot of difference when using IF() conditions.

Also, as others commented earlier - string fields would require more memory and storage size than numeric fields, so every time there is a choice what type of field to use, I'd prefer numeric fields - especially if the field has many distinct values. With just a few distinct values, the difference is negligible.

best,

Oleg Troyansky

Oleg Troyansky

Masters Summit for Qlik is going virtual! Dec 16th - I'll teach Performance Tuning

Highlighted
MVP & Luminary
MVP & Luminary

Peter,

It's correct that sequential integers do not use a symbol table. That can significantly reduce RAM requirements if there are many unique values for the field, typical with keys.

-Rob