Dear SAP HANA friends,
I have a question regarding UNION ALL. I have a code where I know that the left or right side will be empty. On top of that there are a lot calculations. Executing only one side gives a performance of 2 seconds. Using the UNION ALL we receive factor 3 which is about 6 seconds. What we see is that the plan is completely different and the UNION ALL is pushed up. Which makes sense from our perspective if both sides of the union all have equal side but in our case the union all has never to be executed because one of both sides is always empty.
Is there any possibility to
a) give a hint to the UNION ALL to be executed exactly at this point
b) any dummy statement to hinder the push up of the UNION ALL in the plan
c) an equivalent statement to the UNION ALL to fetch data either from the one or the other side
Thanks & Kind Regards,