You are on page 1of 75

Week 1: Understanding SAP HANA SQLScript Optimizer

Unit 1: Course Introduction


Course introduction
Overview

▪ Weekly assignments / final exam Using the Optimizer for SQLScript Programming in SAP HANA
▪ Discussion forum

Week 1
▪ Use your own SAP HANA Understanding SAP HANA SQLScript Optimizer
system for practice

Week 2
SAP HANA SQLScript Supportability Features

Week 3 Investigating SQLScript Performance Caused by SQL

Final Exam

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Course introduction
Week 1: Understanding SAP HANA SQLScript Optimizer

Unit 1: Course introduction

Unit 2: SAP HANA SQLScript optimizer


▪ Learn how the SQLScript engine works, including SQLScript optimizer
▪ Learn how the SQLScript engine works with the SQL engine and SQL plan cache

Unit 3: SAP HANA SQLScript optimization rules – Part 1


▪ Learn four rules

Unit 4: SAP HANA SQLScript optimization rules – Part 2


▪ Familiarize yourself with four rules
▪ Be able to recognize original code after it has been optimized

Unit 5: SQLScript general analysis strategy


▪ Learn how to approach SQLScript performance issues

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Course introduction
Week 2: SAP HANA SQLScript Supportability Features

Unit 1: SQLScript supportability

Unit 2: SQLScript supportability – SQL Trace


▪ Demo: collecting SQL Trace and checking the result

Unit 3: SQLScript supportability – Plan Profiler


▪ Demo: collecting Plan Profiler and checking the result

Unit 4: SQLScript supportability – M_ACTIVE_PROCEDURES


▪ Demo: collecting M_ACTIVE_PROCEDURES and checking the result

Unit 5: SQLScript supportability – EXPLAIN PLAN FOR CALL


▪ Demo: collecting EXPLAIN PLAN FOR CALL and checking the result

Unit 6: SQLScript supportability – Plan Visualizer


▪ Demo: using the new SQL analyzer tool
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4
Course introduction
Week 3: Investigating SQLScript Performance Caused by SQL

Unit 1: INLINE feature

Unit 2: Case study 1 – Using the INLINE feature

Unit 3: BIND_AS_PARAMETER and BIND_AS_VALUE functions

Unit 4: Case study 2 – Using BIND_AS_VALUE

Unit 5: Using SQL hint in SQLScript

Unit 6: Pinning SQL hint for SQLScript

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2023 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.
Week 1: Understanding SAP HANA SQLScript Optimizer
Unit 2: SAP HANA SQLScript Optimizer
SAP HANA SQLScript optimizer
Learning objectives

By the end of this week you will Using the Optimizer for SQLScript Programming in SAP HANA
understand

Week 1
▪ How SQLScript is executed
Understanding SAP HANA SQLScript Optimizer
▪ How SQLScript optimizer works
▪ The difference between SQLScript
optimizer and SQL optimizer

Week 2
▪ How SQLScript works with SQL plan SAP HANA SQLScript Supportability Features
cache
▪ General analysis strategy for SQLScript

Week 3
performance issues
Investigating SQLScript Performance Caused by SQL

Final Exam

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


SAP HANA SQLScript optimizer
What is SQLScript?

A programming language of SAP HANA CREATE PROCEDURE HELLO(IN P NVARCHAR(8))


AS BEGIN
SQLScript supports DECLARE V_NAME NVARCHAR(8) = :P;
▪ Imperative programming constructs IF :P = '' THEN
▪ Declarative SQL statements V_NAME = 'SAP HANA';
END IF;
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
END;

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


SAP HANA SQLScript optimizer
What is SQLScript?

A programming language of SAP HANA CREATE PROCEDURE HELLO(IN P NVARCHAR(8))


AS BEGIN
SQLScript supports DECLARE V_NAME NVARCHAR(8) = :P;
▪ Imperative programming constructs IF :P = '' THEN
▪ Declarative SQL statements V_NAME = 'SAP HANA';
END IF;
CREATE PROCEDURE statement
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;

CALL statement END;

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


SAP HANA SQLScript optimizer
What is SQLScript?
Imperative programing constructs

A programming language of SAP HANA CREATE PROCEDURE HELLO(IN P NVARCHAR(8))


AS BEGIN
SQLScript supports DECLARE V_NAME NVARCHAR(8) = :P;
▪ Imperative programming constructs IF :P = '' THEN
▪ Declarative SQL statements V_NAME = 'SAP HANA';
END IF;
CREATE PROCEDURE statement
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;

CALL statement END;

SQLScript procedure HELLO has imperative


programming constructs CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


SAP HANA SQLScript optimizer
What is SQLScript?

A programming language of SAP HANA CREATE PROCEDURE HELLO(IN P NVARCHAR(8))


AS BEGIN
SQLScript supports DECLARE V_NAME NVARCHAR(8) = :P;
▪ Imperative programming constructs IF :P = '' THEN
▪ Declarative SQL statements V_NAME = 'SAP HANA';
END IF;
CREATE PROCEDURE statement
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;

CALL statement END;


Declarative SQL statements
SQLScript procedure HELLO has imperative
programming constructs and a declarative CALL HELLO('');
SQL statement

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
How does the SQLScript engine work? AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

When a user executes a SQLScript procedure, END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
the SQLScript engine does the following: END;

▪ Compilation
▪ Optimization CALL HELLO('');

▪ Execution
Compilation

Optimization

Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
What is the SQLScript optimizer? AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

When a user executes a SQLScript procedure, END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
the SQLScript engine does the following: END;

▪ Compilation
▪ Optimization CALL HELLO('');

▪ Execution
Compilation

Optimization

Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
SQLScript and SQL plan cache AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

When a user executes a SQLScript procedure, END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
the SQLScript engine does the following: END;

▪ Compilation Plan
Cache
▪ Optimization CALL HELLO('');

▪ Execution
Compilation
The SQLScript execution plan is cached in SQL
plan cache
Optimization

Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
SQLScript and SQL plan cache AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

When a user executes a SQLScript procedure, END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
the SQLScript engine does the following: END;

▪ Compilation Plan
Cache
▪ Optimization CALL HELLO('');

▪ Execution

The SQLScript execution plan is cached in SQL Compilation


plan cache

Once cached, the cached execution plan is


used, skipping the compilation and optimization Optimization
phases

Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
SQLScript optimizer and SQL optimizer AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

The SQLScript engine executes imperative END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
programming constructs END;

The SQLScript engine passes declarative SQL


statements to the SQL engine in the CALL HELLO('');

“Execution” phase
Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 11
SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
SQLScript optimizer and SQL optimizer AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

The SQLScript engine executes imperative END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
programming constructs END;

The SQLScript engine passes declarative SQL


statements to the SQL engine in the CALL HELLO(''); SELECT 'HELLO, ' ... FROM DUMMY;

“Execution” phase
Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 12
SAP HANA SQLScript optimizer
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
SQLScript optimizer and SQL optimizer AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
V_NAME = 'SAP HANA';

The SQLScript engine executes imperative END IF;


SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
programming constructs END;

The SQLScript engine passes declarative SQL


statements to the SQL engine in the CALL HELLO(''); SELECT 'HELLO, ' ... FROM DUMMY;

“Execution” phase
Compilation Compilation
The SQLScript engine reshapes SQL
statements during the “Optimization” phase,
before passing them to the SQL engine
stmt Optimization Optimization
stmt’
stmt”

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 13
SAP HANA SQLScript optimizer
SQLScript and SQL plan cache

Plan Cache
1. The SQLScript execution plan for
CALL HELLO(‘’);
is inserted into the SQL plan cache.

CALL HELLO('');

Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 14
SAP HANA SQLScript optimizer
SQLScript and SQL plan cache

Plan Cache
1. The SQLScript execution plan for
CALL HELLO(‘’);
is inserted into the SQL plan cache.
2. The SQLScript engine passes
CALL HELLO(''); SELECT 'HELLO, ' ... FROM DUMMY;
SELECT ‘HELLO, ’ … FROM DUMMY;
to the SQL engine.
Compilation Compilation
3. The SQL query plan for
SELECT ‘HELLO, ’ … FROM DUMMY;
is inserted into the SQL plan cache too.
Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 15
SAP HANA SQLScript optimizer
SQLScript and SQL plan cache

Plan Cache
1. The SQLScript execution plan for
CALL HELLO(‘’);
is inserted into the SQL plan cache.
2. The SQLScript engine passes
CALL HELLO('');
SELECT ‘HELLO, ’ … FROM DUMMY;
to the SQL engine.
Compilation Compilation
3. The SQL query plan for
SELECT ‘HELLO, ’ … FROM DUMMY;
is inserted into the SQL plan cache too.
4. For the next CALL HELLO(‘’), the execution plan Optimization Optimization
is reused without the SQLScript
compilation/optimization phases.

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 16
SAP HANA SQLScript optimizer
SQLScript and SQL plan cache

Plan Cache
1. The SQLScript execution plan for
CALL HELLO(‘’);
is inserted into the SQL plan cache.
2. The SQLScript engine passes
CALL HELLO(''); SELECT 'HELLO, ' ... FROM DUMMY;
SELECT ‘HELLO, ’ … FROM DUMMY;
to the SQL engine.
Compilation Compilation
3. The SQL query plan for
SELECT ‘HELLO, ’ … FROM DUMMY;
is inserted into the SQL plan cache too.
4. For the next CALL HELLO(‘’), the execution plan Optimization Optimization
is reused without the SQLScript
compilation/optimization phases.
5. For the next SELECT ‘HELLO, ’ … FROM
DUMMY, the query plan is reused without the SQL Execution Execution
compilation/optimization phases.
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 17
SAP HANA SQLScript Optimizer
Key takeaways

The SQLScript engine has three phases –


compilation, optimization and execution.

The SQLScript engine deals with imperative


programming constructs.

The SQLScript engine passes declarative SQL


statements to the SQL engine in the “Execution”
phase.

The SQLScript optimizer reshapes SQL


statements during the “Optimization” phase.

The SQLScript execution plan is cached in the


SQL plan cache.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2023 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.
Week 1: Understanding SAP HANA SQLScript Optimizer
Unit 3: SAP HANA SQLScript Optimization Rules
– Part 1
SAP HANA SQLScript optimization rules – Part 1
Four rules of the SAP HANA SQLScript optimizer

Constant
propagation

Control flow Procedure


simplification flattening

SQL statement
inlining and
parallelization
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
SAP HANA SQLScript optimization rules – Part 1
Constant propagation

Evaluate the SQL expression and folding constant.


Propagate the value through the value chain.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


SAP HANA SQLScript optimization rules – Part 1
Constant propagation

Evaluate the SQL expression and folding constant. CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
AS BEGIN
Propagate the value through the value chain.
DECLARE V_NAME NVARCHAR(8) = :P;
IF :P = '' THEN
When an empty string ‘’ is given as an input V_NAME = 'SAP HANA';
parameter of the SQLScript procedure HELLO, this
END IF;
constant value is used in compile time.
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
END;

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


SAP HANA SQLScript optimization rules – Part 1
Constant propagation

Evaluate the SQL expression and folding constant. CREATE PROCEDURE HELLO( '' )
AS BEGIN
Propagate the value through the value chain.
DECLARE V_NAME NVARCHAR(8) = '';
IF '' = '' THEN
When an empty string ‘’ is given as an input V_NAME = 'SAP HANA';
parameter of the SQLScript procedure HELLO, this
END IF;
constant value is used in compile time.
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
The SQLScript optimizer propagates the empty
END;
string ‘’ as a constant to all positions of variable P.

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


SAP HANA SQLScript optimization rules – Part 1
Procedure flattening

Unfold the body of the callee SQLScript into the


body of the caller SQLScript.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


SAP HANA SQLScript optimization rules – Part 1
Procedure flattening

CREATE PROCEDURE WHO(OUT N NVARCHAR(8))

Unfold the body of the callee SQLScript into the AS BEGIN


body of the caller SQLScript. SELECT TOP 1 'SAP HANA' INTO N FROM DUMMY;
END;

The SQLScript procedure WHO is executed


CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
inside the procedure HELLO.
AS BEGIN
DECLARE V_NAME NVARCHAR(8);
CALL WHO(V_NAME);
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
END;

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


SAP HANA SQLScript optimization rules – Part 1
Procedure flattening

CREATE PROCEDURE WHO(OUT N NVARCHAR(8))

Unfold the body of the callee SQLScript into the AS BEGIN


body of the caller SQLScript. SELECT TOP 1 'SAP HANA' INTO N FROM DUMMY;
END;

The SQLScript procedure WHO is executed


CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
inside the procedure HELLO. Then the body of
the procedure WHO is unfolded instead of CALL AS BEGIN
WHO(). DECLARE V_NAME NVARCHAR(8);
SELECT TOP 1 'SAP HANA' INTO V_NAME FROM DUMMY;
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
END;

CALL HELLO('');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


SAP HANA SQLScript optimization rules – Part 1
SQL statement inlining and parallelization

SQL statements with no dependency can be


executed in parallel.
SQL statements with dependency can be merged
into a single SQL statement.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


SAP HANA SQLScript optimization rules – Part 1
SQL statement inlining and parallelization

SQL statements with no dependency can be CREATE PROCEDURE HELLO()


executed in parallel. AS BEGIN

SQL statements with dependency can be merged RESULT = SELECT 'HELLO' FROM DUMMY;
into a single SQL statement. SELECT * FROM DUMMY, :RESULT;
END;

The two SQL statements in the procedure HELLO


have dependency, since RESULT of the first
statement is used in the second one. CALL HELLO();

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


SAP HANA SQLScript optimization rules – Part 1
SQL statement inlining and parallelization

SQL statements with no dependency can be CREATE PROCEDURE HELLO()


executed in parallel. AS BEGIN

SQL statements with dependency can be merged WITH "_SYS_RESULT_2" AS (SELECT 'HELLO' FROM DUMMY)
into a single SQL statement. SELECT * FROM DUMMY, "_SYS_RESULT_2" "RESULT" ;
END;

The two SQL statements in the procedure HELLO


have dependency, since RESULT of the first
statement is used in the second one. These two CALL HELLO();
SQL statements can be combined by using a
“WITH” clause. This optimization is called the
“inlining” feature.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


SAP HANA SQLScript optimization rules – Part 1
Control flow simplification

Dead-code elimination
▪ Statements, if it is guaranteed that their
generated results will never be used.
▪ Unreachable branches, if it is determined that the
conditions for branches are evaluated as false
after constant propagation.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


SAP HANA SQLScript optimization rules – Part 1
Control flow simplification

Dead-code elimination CREATE PROCEDURE HELLO(IN P NVARCHAR(8))

▪ Statements, if it is guaranteed that their AS BEGIN


generated results will never be used. DECLARE V_NAME NVARCHAR(8) = :P;

▪ Unreachable branches, if it is determined that the IF :P = '' THEN


conditions for branches are evaluated as false V_NAME = 'SAP HANA';
after constant propagation. END IF;
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
END;

CALL HELLO('HI');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


SAP HANA SQLScript optimization rules – Part 1
Control flow simplification

Dead-code elimination CREATE PROCEDURE HELLO( 'HI' )

▪ Statements, if it is guaranteed that their AS BEGIN


generated results will never be used. DECLARE V_NAME NVARCHAR(8) = 'HI';

▪ Unreachable branches, if it is determined that the IF 'HI' = '' THEN


conditions for branches are evaluated as false V_NAME = 'SAP HANA';
after constant propagation. END IF;
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
After constant propagation, it turned out that the END;
condition of the IF statement is always false
( ‘HI’ = ‘’ )
CALL HELLO('HI');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


SAP HANA SQLScript optimization rules – Part 1
Control flow simplification

Dead-code elimination CREATE PROCEDURE HELLO( 'HI' )

▪ Statements, if it is guaranteed that their AS BEGIN


generated results will never be used. DECLARE V_NAME NVARCHAR(8) = 'HI';

▪ Unreachable branches, if it is determined that the IF 'HI' = '' THEN


conditions for branches are evaluated as false V_NAME = 'SAP HANA';
after constant propagation. END IF;
SELECT 'HELLO, ' || :V_NAME FROM DUMMY;
After constant propagation, it turned out that the END;
condition of the IF statement is always false
( ‘HI’ = ‘’ ), so this IF branch can be eliminated
before execution time.
CALL HELLO('HI');

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


SAP HANA SQLScript optimization rules – Part 1
Key takeaways

Four SQLScript optimization rules


▪ Constant propagation
▪ Procedure flattening
▪ SQL statement inlining and parallelization
▪ Control flow simplification

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2023 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.
Week 1: Understanding SAP HANA SQLScript Optimizer
Unit 4: SAP HANA SQLScript Optimization Rules
– Part 2
SAP HANA SQLScript optimization rules – Part 2
Four rules of the SAP HANA SQLScript optimizer

Constant
propagation

Control flow Procedure


simplification flattening

SQL statement
inlining and
parallelization
© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2
SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

A base table and table type CREATE TABLE TAB1 (MATERIAL NVARCHAR(10), FABRIC_ID NVARCHAR(10));
INSERT INTO TAB1 VALUES ('ABC' , 'BI');
CREATE TYPE T_RESULT AS TABLE (MATERIAL NVARCHAR(10), FABRIC_ID NVARCHAR(10));

SQLScript procedure P2 CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

SQLScript procedure P1 CREATE PROCEDURE P1(IN F1 NVARCHAR(13))


AS BEGIN
CALL P2(:F1, :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation

-- CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

-- CREATE PROCEDURE P1(IN F1 NVARCHAR(13))


AS BEGIN
CALL P2(:F1, :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation

-- CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
CALL P2('TA', :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation

-- CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
CALL P2('TA', :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation

-- CREATE PROCEDURE P2( 'TA' , OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF 'TA'= 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
CALL P2('TA', :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Procedure flattening

-- CREATE PROCEDURE P2( 'TA' , OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF 'TA'= 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
CALL P2('TA', :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Procedure flattening

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF 'TA'= 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Control flow simplification

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF 'TA'= 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);

V_F_ID = 'BI';

T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1


WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation, again!

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);

V_F_ID = 'BI';

T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1


WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Constant propagation, again!

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN

T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1


WHERE 'BI' = '' OR 'BI' = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

SQL statement inlining and parallelization

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN

T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1


WHERE 'BI' = '' OR 'BI' = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
SELECT * FROM :T_RESULT ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

SQL statement inlining and parallelization

-- CREATE PROCEDURE P1( 'TA' )


AS BEGIN
WITH "_SYS_T_TABLE_2" AS
(SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE 'BI' = '' OR 'BI' = FABRIC_ID),
"_SYS_T_RESULT_1" AS
(SELECT * FROM "_SYS_T_TABLE_2" "T_TABLE"
ORDER BY MATERIAL)
SELECT * FROM "_SYS_T_RESULT_1" "COMPOSITION"
ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


SAP HANA SQLScript optimization rules – Part 2
When “CALL P1(‘TA’)” is executed

Final output of the SQLScript optimizer

AS BEGIN
WITH "_SYS_T_TABLE_2" AS
(SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE 'BI' = '' OR 'BI' = FABRIC_ID),
"_SYS_T_RESULT_1" AS
(SELECT * FROM "_SYS_T_TABLE_2" "T_TABLE"
ORDER BY MATERIAL)
SELECT * FROM "_SYS_T_RESULT_1" "COMPOSITION"
ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


SAP HANA SQLScript optimization rules – Part 2
Output of the SQLScript optimizer

Definition of SQLScript procedure P1 Actual running code of P1 by CALL P1(‘TA’)

CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN
V_F_ID = 'BI';
END IF;
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID;
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL;
END;

CREATE PROCEDURE P1(IN F1 NVARCHAR(13))


AS BEGIN
CALL P2(:F1, :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17


SAP HANA SQLScript optimization rules – Part 2
Output of the SQLScript optimizer

Definition of SQLScript procedure P1 Actual running code of P1 by CALL P1(‘TA’)

CREATE PROCEDURE P2(IN F2 NVARCHAR(13), OUT T_RESULT TAB1)


AS BEGIN
DECLARE V_F_ID NVARCHAR(13);
IF :F2 = 'TA' THEN AS BEGIN
V_F_ID = 'BI'; WITH "_SYS_T_TABLE_2" AS
END IF; (SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1
T_TABLE = SELECT DISTINCT MATERIAL, FABRIC_ID FROM TAB1 WHERE 'BI' = '' OR 'BI' = FABRIC_ID),
WHERE :V_F_ID = '' OR :V_F_ID = FABRIC_ID; "_SYS_T_RESULT_1" AS
T_RESULT = SELECT * FROM :T_TABLE ORDER BY MATERIAL; (SELECT * FROM "_SYS_T_TABLE_2" "T_TABLE"
END; ORDER BY MATERIAL)
SELECT * FROM "_SYS_T_RESULT_1" "COMPOSITION"
CREATE PROCEDURE P1(IN F1 NVARCHAR(13)) ORDER BY MATERIAL;
AS BEGIN END;
CALL P2(:F1, :COMPOSITION);
SELECT * FROM :COMPOSITION ORDER BY MATERIAL;
END;

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


SAP HANA SQLScript optimization rules – Part 2
Key takeaways

The output of the SQLScript optimizer can be


very different with the code of a procedure
definition.

Recognizing the output result of SQLScript


optimization is the first step in investigating a
performance issue.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 19


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2023 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.
Week 1: Understanding SAP HANA SQLScript Optimizer
Unit 5: SQLScript General Analysis Strategy
SQLScript general analysis strategy
CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
Find a dominant step AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;

......

In which step does the procedure take long


SELECT ...... ;
to execute? END;

CALL HELLO(''); SELECT ...... ;

Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 2
SQLScript general analysis strategy
Find a dominant step – Imperative constructs CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;

......

In which step does the procedure take long


SELECT ...... ;
to execute? END;

▪ Execution in SQLScript
(= anti-patterns of SQLScript code) CALL HELLO(''); SELECT ...... ;
– Row-based calculation
– Inefficient usage of imperative constructs
Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 3
SQLScript general analysis strategy
Find a dominant step – Imperative constructs CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;

......

In which step does the procedure takes long


SELECT ...... ;
to execute? END;

▪ Execution inBest practices for anti-patterns are well documented in


SQLScript
▪ “Best
(= anti-patterns Practices for
of SQLScript Using SQLScript” in SAP HANA SQLScript Reference
code)
▪ “SQLScript Performance Guidelines” in SAP HANA Performance Guide for Developers
CALL HELLO(''); SELECT ...... ;
– Row-based calculation
– InefficientPlease
usage of imperative
visit SAP Helpconstructs
Portal Compilation Compilation

Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 4
SQLScript general analysis strategy
Find a dominant step – SQL statement CREATE PROCEDURE HELLO(IN P NVARCHAR(8))
AS BEGIN
DECLARE V_NAME NVARCHAR(8) = :P;

......

In which step does the procedure take long


SELECT ...... ;
to execute? END;

▪ Execution in SQLScript
(= anti-patterns of SQLScript code) CALL HELLO(''); SELECT ...... ;
– Row-based calculation
– Inefficient usage of imperative constructs
Compilation Compilation
▪ Processing in SQL engine
– Long compilation of passed SQL statements
– Long execution of passed SQL statements
Optimization Optimization

Execution Execution

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC SQLScript Engine SQL Engine 5
SQLScript general analysis strategy
Find a dominant step – SQL statement

In which step does the procedure take long


to execute?
▪ Execution in SQLScript
(= anti-patterns of SQLScript code )
– Row-based calculation
– Inefficient usage of imperative constructs
▪ Processing in SQL engine
– Long compilation of passed SQL statements
– Long execution of passed SQL statements

The first step is to find the dominant SQL statement!

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


SQLScript general analysis strategy
Key takeaways

The anti-pattern of SQLScript code should be


checked for performance issues caused by
imperative programming constructs.

The actual running SQL statements generated by


the SQLScript optimizer must be checked first for
performance issues caused by SQL statements.

© 2023 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Thank you.
Contact information:

open@sap.com
Follow all of SAP

www.sap.com/contactsap

© 2023 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of
SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its
distributors contain proprietary software components of other software vendors. National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or
warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials.
The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty
statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or
any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation,
and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platforms, directions, and
functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason
without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ
materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and they
should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names
mentioned are the trademarks of their respective companies.
See www.sap.com/trademark for additional trademark information and notices.

You might also like