Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

New Contributor III

Concatenate field in script or in object?


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.


2 Replies
MVP & Luminary
MVP & Luminary

Re: Concatenate field in script or in object?

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

MVP & Luminary
MVP & Luminary

Re: Concatenate field in script or in object?

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.