Why Avoid Mixing Calculation Engine Plan Operators and SQL Queries

SAP HANA Database Best Practices:

The semantics of relational operations as used in SQL queries and calculation engine operations are
different. In the calculation engine operations will be instantiated by the query that is executed on
top of the generated data flow graph. Therefore the query can significantly change the semantics of
the data flow graph.

For example in a calculation view which is queried using attributes publisher (but not year) which
contains a aggregation node (i.e. CE_AGGREGATION) which is defined on publisher and year, the
grouping on year would be removed from the grouping. Evidently this reduces the granularity of the
grouping, and thus changes the semantics of the model. On the other hand, in a nested SQL query
containing a grouping on publisher and year this aggregation-level would not be changed if an
enclosed query only queries on publisher.

Because of the different semantics outlined above the optimization of a mixed data flow using both
types of operations is currently limited. Hence, one should avoid mixing both types of operations in
one procedure

Tags: SAP HANA Database Best Practices, CE_AGGREGATION, Avoid Mixing Calculation Engine Plan Operators and SQL Queries

Share this article :

Post a Comment

Copyright © 2011. SAP HANA TUTORIALS FREE - S/4 HANA - All Rights Reserved