






Note how two tables perform a full outer join twice, just in a different order. First is Table 1 join Table 2, then Table 2 join Table 1:
... select coalesce(pa11.ITEM_ID, pa12.ITEM_ID) ITEM_ID, pa11.WJXBFS1 WJXBFS1, pa12.WJXBFS1 WJXBFS2 into #ZZMD02 from #ZZSP00 pa11 full outer join #ZZSP01 pa12 on (pa11.ITEM_ID = pa12.ITEM_ID) select coalesce(pa11.ITEM_ID, pa12.ITEM_ID) ITEM_ID, pa11.WJXBFS2 WJXBFS1, pa12.WJXBFS2 WJXBFS2 into #ZZMD03 from #ZZSP01 pa11 full outer join #ZZSP00 pa12 on (pa11.ITEM_ID = pa12.ITEM_ID) ...
This is a known issue in Strategy 2019 and previous versions. Depending on the DBMS your warehouse is built on and other VLDB settings, you may be affected by this issue:
In the new fix, Data Engine fixes its logic to change the way mergeable passes are compared so that a pass will be compared with every other pass rather than in a hard-coded order. This looks at all possible combinations of merges and prevents extra unnecessary joins from being done.
This fix serves to optimize performance when SQL Global Optimization is set to Level 4 and should not change data, only SQL. Again, this fix does not apply to all warehouses as some DBMS do not support the optimizations.
Strategy Internal Reference Number for the technical note is KB483322 and DE133372