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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with left join

Hello!

I have some problem when i use left join in a script.

I have to big register, tabell1 and tabell2, when i use lefte join it never ending runnin and my memory in my server is very high, Why? When i use smaller register its works!

You can see a example on my scipt:

Tabell1:

Load

a,

b

from xxx;

Tabell2:

left join load

a,

c

from zzz;

I hope some one can help me.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

This happens because the second table contains lots of values c for each a value so the number of rows grow exponentially ...

The good way to manage this problem (when you have low memory) is reduce data before left join, so if you can it would be better to do a select with where on both tables before joining ...

Hope it helps.

View solution in original post

4 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

use the syntax as mentioned below

Tabell1:

Load

a,

b

from xxx;

left join(Tabell1)

load

a,

c

from zzz;

Hope this will help.

-Nilesh

alexandros17
Partner - Champion III
Partner - Champion III

This happens because the second table contains lots of values c for each a value so the number of rows grow exponentially ...

The good way to manage this problem (when you have low memory) is reduce data before left join, so if you can it would be better to do a select with where on both tables before joining ...

Hope it helps.

Not applicable
Author

hi

try this

Tabell1:

Load

a,

b

from xxx;

left join

Tabell2:

load

a,

c

from zzz;

andries_bos
Creator II
Creator II

I had same issues when there is in a lot of cases no relation between some values in tabel 1 and 2.

If there is no join, it will create information for the possible independant combinations. This will increase mem usage.

Normally I prefer and use, if possible, a 'Keep left' to 'add' new information from the second source.