Skip to Content

How the execution engine is determined for a HANA calculation view

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?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 15, 2018 at 10:16 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded