Sunteți pe pagina 1din 10

Different Engines in SAP HANA

HANA 4,953 Views

inShare8

Hello Everyone,
In this article I would like to explain about different types of engines we have in HANA and
how each engine will process the execution of modeling objects or native sql statements at
Database level.
The below image shows the different engines available in HANA Database to process models
execution. They are,

Join Engine

OLAP Engine

Calculation Engine

ROW Engine

SQL Engine

The engines used in the backend to process a native sql statement or select statement on
modeling objects can be identified using Visualize Plan option available with right click.
Write the sql statement in SQL console Select the statement Right Click Visualize
Plan

Join Engine:
1.

This engine is used when we execute any Attribute View in HANA or run native SQL
on more than one table with join condition.

2.

If there are any calculations involved either in Attribute View or in native SQL then
Join Engine will use Calculation Engine for calculations and fetches the result.

I would like to explain few scenarios on Attribute View and Native SQL to see how different
engines will be called upon execution.
i) Here is a simple select statement on single table executed, Visualize Plan shows that it
didnt use any Engine. This is probably because, it was executed by SQL Parser or we can
also call it as SQL Engine.

ii) Now lets check on an attribute view created on single table, Visualize plan onselect
statement shows us that, it uses join engine.(Prefix : JE implies Join Engine)

iii) Either Attribute View or native SQL with Calculations uses Join Engine along with
Calculation Engine to perform the calculations, which means there is data transfer between
both the engines.

OLAP Engine:
1.

This engine will be called in the backend whenever we run any queries on Analytic
Views in SAP HANA.

2.

If there are no additional calculations performed like calculated columns, restricted


measures and counters, then everything will be processed in OLAP Engine.

3.

OLAP Engine acts as join engine for those Attribute Views used in Analytic Views,
without any calculated columns

4.

All the join engine work will be converted into BwPopJoin which is part of OLAP
Engine.

5.

If there are any calculations present, to be performed then Calculation engine will be
used along with OLAP Engine.

Examples:
i) We have created an analytic View with Attribute Views and performed visualize which uses
just OLAP Engines (Prefix: BwPop implies OLAP Engine)

ii) If we have any calculations present either in Analytic or Attribute Views in an Analytic
View then system calls both OLAP and Calculation Engine to execute the model in backend.
Below image is the example where we have created an Analytic View with few calculated
columns and did visualize plan which uses both OLAP and Calculation Engine.

Proceed to the next page to continue reading


Calculation Engine:
1.

This engine is used when we execute calculation view in SAP HANA.

2.

Also it is often called by other engines to perform calculations in any view present in
HANA.

3.

Vice versa a calculation view also uses other engines along with calculation engine.
This is highly dependent on the source objects which were used while building the
calculation view, whether it is GUI or Script based.

Scenarios:

Calculation View on Tables (GUI & Script):


In the first scenario, we have created a calculation view directly on tables and everything is
executed in calculation engine when we did visualize plan (Prefix: CE Implies Calculation
engine)

GUI & SQL Script Calculation View on Models (Analytic View):


In this case lets say we have created a Calculation View on two Analytic Views with GUI
option and system called just OLAP Engine. If the source is Attribute View then the engine
will be Join Engine or if the source is Attribute View with Calculations then both Join Engine
and Calculation Engine.

CE Function Calculation View on Models:


In this scenario irrespective of the source objects used, calculation engine will be used in
the backend to execute the Calculation View. Along with calculation Engine, OLAP engine will
be used if the source is Analytic View and Join Engine incase Attribute View serves as
source.

Note: With this we can easily say in case of CE Functions, system is going to use multiple
engines which has some impact on performance, as the data moves between engines to get
the final result.
SQL Engine:
SQL Engine which is also known as SQL Parser/interface is used for all sorts of SQL

1.

statements generated by frontend application via different different clients and also for
native sql run at database level.
From SAP HANA SP7, we have an option for Calculation Views in Properties section,

2.

where we have an option to choose calculation view to run in SQL Engine. Advantage of
this option is that, instead of moving data between multiple engines HANA executes the
entire script in SQL Engine to get the final result.
Note: We have to keep few things in mind before we use this option.
1. This option is only available for GUI based calculation Views (As of SAP HANA SP9 Rev
94).
2. Using this option actually makes difference in the result of calculated columns based on
the functions we used. Please go through the SAP Note 1857202 SQL Execution of
calculation views for more information on this.
ROW Engine:

1.

This is used to perform operations specifically on ROW tables, which are mostly
system statistics tables.

2.

We have executed a native SQL statement on both ROW and COLUMN store tables
and did a visualize plan which showed usage of ROW Engine.

Thus we had looked at different engines available in SAP HANA and how each engine was
being used based on the type of modeling objects or native SQL executed in SAP HANA.
Thank you for reading and hope this information is helpful. Please do share with your friends
if you feel the information is useful.
Happy Learning.

S-ar putea să vă placă și