Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Dynamic aggregation fields in the calculation view

$
0
0

Hi,

 

we have a calculation view which is generated from the ABAP with BW CalcView services. The view reads the data from the infcoube (0SX_C92). To reduce the data volume we use aggregation (AGGR_0SX_CY_TOTAL) over the fields which are requested with the query which reads the calculation view. The problem is that the requested fields could be different for different queries.

0SX_C92_CALC_VIEW.jpg

There could be 2 solutions:

  1. Generate the calculation view for each requested fields set. Then we will calculate the hash key from the requested fields list and put it to the
    calculation view name. So we will not generate the new calculation view if the requested fields are the same in the already generated view.
  2. The aggregation (AGGR_0SX_CY_TOTAL) will be done in the stored procedure which will use dynamic SQL. The aggregation attributes will be the complete list of fields, but the stored procedure will fill only the requested fields. The advantage is that the calculation view will be only one. But the performance of such dynamic SQL in the stored procedure could be worse. I'm even not yet sure how the stored procedure will look like.

  

Is there any other solution (dynamic aggregation)? If not which way will be better from perforamnce point of view?

 

Kind regards

Radim


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>