Skip to Content
0

How the execution engine is determined for a HANA calculation view

Jan 15 at 05:30 PM

212

avatar image
Former Member

Hi Friends,

We are trying to understand what is the trigger point in HANA to decide which execution engine will be used.

For testing purposes, We created 2 separate calculation view.

1st View

Joined Orders Fact Table(1.5 Billion) with the time dimension in the calc view with star join.

2nd View

Joined Results Fact table(3 Billion) with the time dimension in calc view with star join.

When we are look the 'EXPLAIN PLAN' for both the queries

1st view is running under 'COLUMN' execution engine and running simple query for about 10 mins

2nd view is running under 'OLAP' execution engine and returns the result in 2 seconds.

I know query runs faster if it uses OLAP engine. But unable to understand why the execution engine is different between 2 similar queries.

I understand we can use HINTS to execute a calc view with OLAP plan.

Can you help me for the below points.

1) why 2 different similar queries are behaving differently(different execution engines)?

2) Help me to clarify how the execution is determined in HANA?

Thanks

Srini

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lars Breddemann
Jan 15 at 10:16 PM
0

The decision for which engine gets used to execute a given statement is a rule-based part of the query optimisation in SAP HANA.

The rules are generally undocumented and can change from version to version.

Input factors are (not exhaustive and not ordered) things like:

  • structure of the query/view
  • type of view
  • size of the tables
  • DB parameter settings
  • hints
  • use of specific query functions/constructs

In practice, often it can be that a specific engine does not get used when specific used features (say window functions as an example) appear in the query, and that engine does not support these feature.

If you want to dig deeper into optimizer function on your system, you may activate the corresponding trace options and read through the trace.

From the question posted it sounds as if the two calculation views are technically identical. I doubt this since while the query optimizer and transformation is not externally documented and complex (which turns it into a sort of black box) it is deterministic.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Lars, Thank you Explanation. i got it now.

I read in couple of blogs, in SYS_BIC view the calc view type will be mentioned AS 'OLAP view, but we are not able to find in SYS_BIC. Is there any place we can see the cal view type defined as 'OLAP'.

Thanks

Srini

0
Former Member

Hallo Lars,

Is it possible to control the execution of a statement?

I've noticed a strange behavior in our system and I suppose it has something to do with the optimisation of the execution.

Could you please check my question?

https://answers.sap.com/questions/406914/calculation-view-with-rank-and-filter-unexpected-r.html

Thanks

Marek

0