Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mpbtejada
Contributor III
Contributor III

Concatenate field in script or in object?

Hi!

I'm starting to leverage on the tons of things the QV Document Analyzer by Master Rob Wunderlich offers.

The Count, Size & Bytes columns in the Memory tab in particular is starting to make me think on the approaches I took with my existing projects.

Currently in one of my projects, I'm loading the following in the script: a numeric Materials field, a separate string Description field, and another Materials - Description field which is a concatenation of the 2.

MaterialsDescriptionMaterials - Description
12345Sample 112345 - Sample 1
12346Sample 212346 - Sample 2
12347Sample 312347 - Sample 3

From an ease of use standpoint, loading Materials - Description means that I wouldn't need to Concatenate in the application layer and would just need to call the field directly. But after seeing that the memory consumption was almost doubled, would it be more efficient if I just loaded the Materials and Descriptions field and concatenate instead in the application layer for a Materials - Description at the expense of probably CPU time?

Would appreciate your inputs on this.

Thanks!

2 Replies
marcus_sommer

It will depend on various things (available CPU + RAM, exists already any performance issue, kind of data-structure, fields comes from one or more tables, are key-fields, in which way use within the gui and some more ...) which way might be more suitable in your case.

- Marcus

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It would be more efficient from a memory standpoint to concatenate the strings in the front.  However, you will be using CPU doing it in the front end.  The decision is a trade off.

1. If you are displaying the combined string frequently, it makes sense to do the concatenate in the script -- if you hacve available RAM. .

2. If you are displaying the string infrequently, it makes sense to reclaim the RAM in exchange for an occasional use of CPU.

-Rob