Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Keep Left or exists

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
syukyo_zhu
Creator III
Creator III

Keep Left or exists

Last Update:

Sep 22, 2014 9:26:10 AM

Updated By:

syukyo_zhu

Created date:

Sep 22, 2014 9:26:10 AM

Keep Left or exists. which is more performant?

I will limit my second data table based with the result of my first table. I can use either left keep or Where exists in my second table

So,

Solution1

Table1:

Load mykey from mytableA;

Table2

Load * from mytableB Where exists (mykey);

Solution 2

Table1:

Load mykey from mytableA;

Table2

Keep left (Table1) Load * from mytableB;

Result: Solution 1 is 2 times faster than solution 1

In my example, MytableB have ​​9 million records

So Exists is more performant than " left keep".

Tags (2)
Comments
robert99
Specialist III
Specialist III

Solution 2

Table1:

Load mykey from mytableA;

Table2

left keep (Table1) Load * from mytableB;

what about the above speed wise. As isn't left keep and where exists doing the same thing

0 Likes
syukyo_zhu
Creator III
Creator III

Hi,

yes, the both do the same thing. i want juste show in my exemple "where exists" is more performant than "left keep". if you should reduce your table with 20 millons record with le resultat of your other table. you should use "where exist" and not "left keep".

0 Likes
robert99
Specialist III
Specialist III


OK Thanks. Version 2 is clear. I assume version 2 was how you did the test not version 1?

0 Likes
syukyo_zhu
Creator III
Creator III

yes, i did a mistake in my first version, thanks for your remark.

0 Likes
Version history
Last update:
‎2014-09-22 09:26 AM
Updated by: