Hi HANA experts,
I know how to create variables and how to define a filter based on a variable that the end user can specify.
But I’ll like to understand if defining a variable in a view does change the execution of the view and the filtering is done at lowest level or not. I think this point is very important for performances reasons.
In my example I have 2 AN_VIEWS composed of 1 fact table and 1 attribute view. Each AN_VIEW has 2 filters based on 2 variables linked to 2 of the attribute view attributes. Then I have 1 CALC_VIEW making a union of my 2 AN_VIEWS.
If I run the AN_VIEW preview a window pop-ups and ask me for the variables values.
My question is: at which point the variables are doing the filtering? On the result or at the ATTR_VIEW level where I set my filters?
If I run the AN_VIEW with HANA Studio SQL editor I need to use WHERE clause to set the variables value. In this case the execution is the
same one as the preview? When is the filtering on the variable done at the attribute view level or at the JOIN level?
If I run the CALC_VIEW preview the variables window doesn't pop up (just when I run directly the AN_VIEWS). Can someone explain me why? They are not moved to higher levels?
If I run the CALC_VIEW with HANA Studio SQL editor I can use the WHERE clause to filter on the attributes value (that are defined in the AN_VIEW
as variables/filters). But this filtering will be done inside the AN_VIEW or will be done afterwards just before the UNION in the CALC_VIEW?
I have tried to use the Visual Explorer in HANA studio but didn't get clear conclusions. Maybe someone already did this testing and came out with clear conclusions?