In the context of BWonHana it is important to mention that the term Pruning is not only used in BW to preselect Infoproviders but also in Hana Calculation Views. This should not be confused, in general, both types can play a role when a BW query is executed.
- BW Pruning: If a HCPR/MultiProvider consists of many InfoProviders, it is useful to use 'pruning' for this Provider. The query workload is reduced by checks to determine whether an PartProvider contains any data for the selection range of the query. PartProviders that are not relevant are then not queried at all. The checks are already done in the OLAP Engine (in ABAP on the application server), for more details see MultiProvider:Pruning
- Hana Native Pruning: It is possible to assigne a pruning configuration table to a calculation view which contains more projections in a Union Node. The handling of the pruning is done on the Hana database. See Hana Platform 2.0: Modling Guide 188.8.131.52 Prune Data in Union Nodes and HCPR based on Hana View with Pruning Table
The following simple example deals with BW Pruning applied on a HCPR.
The sample HCPR STPE_HCPR_16 contains the following partproviders
- Hana Calculation View: STPE_CALCVIEW_14
- ADSO: STPEADSO3
- Open ODS View: STPE_ODSV_3
- InfoCube: STPE_IC1
As explained in Pruning MultiProviders, there are different ways how pruning can be used for queries. We use pruning based on a restriction of metadata ( report RSPP_PART_MAINTAIN):
The definition of the filter intervals for each partprovider has to fit to the data stored in the providers(otherwise query results may change when pruning is not used, see below). If e.g. we would enter the interval STPE_MAT BT M001 - M004 for the InfoCube STPE_IC1, the error message RSPP 100 is issued:
In case of virtual/transient providers the system does not check the content and hence the general warning RSPP 059 is displayed:
Content of the HCPR
You can see that the definition of the pruing partition e.g. regarding the calculation view does not fit to the content (M001-M004 is booked, not only M001 and M002).
Test Query with Filter STPE_MAT = M005
Our test query (STPE_HCPR_PRUNING_Q1) is restricted to STPE_MAT = M005. When we take a look at the pruning partition from above, we expect that the providers STPE_ODSV_3 and STPE_CALCVIEW_14 are excluded.
We run the query In RSRT we can use the function 'Explain MultiProvider' in oder to get information displayed about pruning:
So, pruning has worked as expected!
As a next step we change the filter from M005 to M003 and run the query once with and once without pruning(you can switch off pruning in RSRT(see screenshot below)). We will see that the query result is diferent. Therefore, it is very important that the pruning partitions are correctyl defined!