Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

performance tuning

we are using the sql querry to fetch the data..

it s like

load

table1:

col1,

col2,......;

sql select

col........

from(

(select

col.......

from( table1,table2,...........,

where condn.....

) union

(select

col.......

from( table1,...........,

where condn.....

)

) table-a,

(select

col.......

from( table1,...........,

where condn.....

) table-b,

(select

col.......

from( table1,...........,

where condn.....

) table-c,

where condn..... ;

how to optimize this code to make it efficient

1 Solution

Accepted Solutions
prieper
Master II
Master II

I would give it a try and load the tables separately from SQL-server and then combined them in QV.

Peter

View solution in original post

3 Replies
prieper
Master II
Master II

I would give it a try and load the tables separately from SQL-server and then combined them in QV.

Peter

Anonymous
Not applicable
Author

i didi it seperately. but the record count gets varied.

in sql , the condition is like this

where

table2.clounmA (+) = table1.columnA

in my qlikview code , is the following expression is correct?

table1:

load

columnA...

from..... ;

left keep(table1)

table2:

load

columnA...

from..... ;

prieper
Master II
Master II

If I get your code right, then you actually load 2 tables with different conditions (WHERE-clauses) and to glue them together into one table. In this case you should use the JOIN-operator.
LEFT KEEP creates a new table having only those keyfields, which are existing in the other table (typically used for description like customer-code, customer-name, customer-address etc).
Thus your syntax should read

Table1: LOAD ColumnA, .... FROM ....;
JOIN LOAD ColumnA, .... FROM ....;


Doing so you should have just one table, having all records from table1 and from table2.

HTH
Peter