Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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".
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
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".
OK Thanks. Version 2 is clear. I assume version 2 was how you did the test not version 1?
yes, i did a mistake in my first version, thanks for your remark.