Hello experts,
I am trying to garner some SQL performance tuning tips out of the document 'SAP HANA Database - Development Guide' and one tip is as the following:
"The column engine does not native support filter predicates inside outer-join predicates. Filter predicates over the right hand side of a left outer join and filter predicates over the left hand side of a right outer join are exceptions because shifting those predicates to the selections invoked by the join operation produces the same results"
I have doubts on the statement marked black. In my understanding the statement seems to claim that the following 2 queries produce the same results
SELECT ...
FROM t1 LEFT OUTER JOIN t2 on t1.c1 = t2.c1 and t2.c2 = 'A'
SELECT ...
FROM t1 LEFT OUTER JOIN t2 on t1.c1 = t2.c1
WHERE t2.c2 = 'A'
Well, the above 2 sql statements look similar and the difference is subtle. But actually they DO NOT produce the same results. The first sql does produce a larger result set.
Can anyone of you maybe shed some light on this tip from the document?
Thanks and kind regards,
James