Showing results for 
Search instead for 
Did you mean: 

Filters linked to Variables: At which point is the filtering done?

Product and Topic Expert
Product and Topic Expert
0 Kudos

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?



Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello there Maria,

There's an awesome blog post by Ravindra explaining filter 'pushdowns'. It will surely let you know where the filter is applied. Here's the link:



Answers (0)