Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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
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.
hi
try this
Tabell1:
Load
a,
b
from xxx;
left join
Tabell2:
load
a,
c
from zzz;
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.