sql cockpit & sap hana - · pdf filesql cockpit & sap hana verify your sql queries for...
TRANSCRIPT
SQL Cockpit & SAP HANA Verify your SQL queries for HANA-
suitability
Johann Fößleitner Cadaxo GmbH
eMail: [email protected]
Twitter: @foessleitnerj
1 SAP HANA Integration Scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
ABAP Open SQL Native SQL DB Hints
ADBC (DB Features)
What impact does a conversion to HANA have on
client programs?
• Programs run
predominantly
continue running
problem-free
• Many queries are
considerably faster
• Some queries behave the
same after the conversion
• Isolated queries can have
reduced performance
• Programs must be
verified
• Change to Open SQL if
possible
• DB Hints tested/adjusted
• ADBC access
tested/adjusted
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
SAP ABAP Application Server
SAP HANA
Read / Write,
primary connection
Business Suite – SAP HANA Scenarios
SAP ABAP Application Server
SAP HANA AnyDB (Traditional)
Replikation
Read only,
secondary connection
SLT
Side-by-Side
SAP ABAP Application Server
SAP HANA AnyDB (Traditional)
Integrated
Read/Write,
secondary connection Read / Write,
primary connection
Read / Write,
primary connection
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
Golden SQL Rules
The golden SQL Rules are just as
applicable in the HANA environment as
in other DB environments
The golden SQL Rules Result set should be kept small
Amount of data should be kept to a minimum
Number of data transfers should be minimised
Secondary indices should be used
Redundant queries should be avoided
Die goldenen SQL Regeln Resultset should be kept small
Amount of data should be kept to a minimum
Number of data transfers should be minimised
Secondary indices should be used
Redundant queries should be avoided
Result set should be kept small
Don‘t use SELECT … CHECK/EXIT … ENDSELECT
WHERE-clause should be as specific as possible
Amount of data should be kept to a
minimum
Avoid using SELECT *
Use aggregate functions (COUNT, SUM, … )
Number of data transfers should
be minimised
Joins and Subselects should be used
Use SELECT for all ENTRIES
INSERT/UPDATE, … FROM TABLE should be used
Secondary indices should be used
Meaningful secondary indices should be
created/implemented
Access of the secondary indices should be tested
Redundant queries should be
avoided Redundant read access should be avoided
Table buffering should be activated
Perform sorting of the bulk data in ABAP
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
…
SELECT <column> from <table>
connection HDB
where …
…
Open SQL / Connection
EXEC SQL.
connect to 'HDB' as 'HDB'
ENDEXEC.
EXEC SQL.
open …
ENDEXEC.
Native SQL
…
CL_SQL_CONNECTION=>GET_CONNECTION(
con_name = ‘HDB‘ ).
…
ADBC (ABAP Database Connectivity)
Very simple
Tables must be defined in ABAP dictionary No access to analytical views, HANA procedures, …
Access to HANA Objects (procedures, … )
Higher implementation complexity
Access to HANA Objects (procedures, … )
Simpler to implement than native SQL
Side-by-Side ABAP/HANA
…
SELECT <column> from <table>
where …
…
Open SQL
…
SELECT <column> from <hana_view>
where …
…
External Views
…
CALL DATABASE PROCEDURE …
…
HANA Prozeduren (DB Proxy)
As before
Generation of external views in HANA Studio Analytical Views, …
Access with normal ABAP Open SQL
Proxy generation of procedures in HANA Studio
Integrated ABAP/HANA
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
How do I find ABAP (SQL) coding to be potentially
optimized/corrected?
Static checks
• Code Inspector
• ABAP Test Cockpit (ATC)
Monitoring tools in ABAP
• SQL Trace (ST05)
• Runtime Analysis (SAT)
• SQL Monitor (SQLM)*
• SQL Performance Tuning Worklist (SWLT)*
• Coverage Analyzer
• 3rd Party tools
• …
Monitoring tools at DB level
• DB dependant SQL monitoring tools
* Available from 7.40 in Standard
Code Inspector
• Static performance tests • Many SQL relevant tests are available
• SELECT *, Indices, Nested LOOP, …
• Analyses don‘t distinguish, • if it concerns „dead coding“
• if the coding sequence is often used
i.e. if it is relevant for optimization
• Dynamic SQL queries can not be
analysed
SQL Monitor
• Logs all SQL queries
• Implementation in productive
environment is possible with
little/no impact on performance
• Can also be utilized for non-HANA
based SAP Systems • E.g. BEFORE a HANA-conversion
• Available from NW 7.00
SQL Performance Tuning Worklist
• Combines static tests (Code
Inspector, ABAP Test Cockpit)
with related SQL Monitor results
• Ideal combination to pin-point
SQL queries to be optimized
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
„ABAP Open SQL Database Viewer“
Support Acceleration
of IT processes
Development Test
management
Knowledge sharing tool
Data consistency
Area of
application
Overview
Some clients using SQL Cockpit:
Live presentation of SQL Cockpit
SQL Cockpit versions
Standard Edition
• SQL Viewer/Editor
• No database manipulation possible
Premium Edition
• Traceable changes directly on table level
• Verified by E&Y*
* KFS/DV1 „Accepted IT accounting principles“
1 SAP Hana integration scenarios (Business Suite)
2 Golden SQL Rules
3 HANA Objects in ABAP
4 Analysis / Monitoring Tools in SAP Standard
5 Cadaxo SQL Cockpit
6 Questions & answers, further information
Agenda
Questions & Answers
Further information • ABAP und SAP HANA
– http://www.saphana.com
– http://sdn.sap.com/community/abap/hana
– SAP Press: ABAP Development for SAP Hana
• ISBN 978-1-59229-859-4 • http://www.sap-press.com/products/ABAP-Development-for-SAP-HANA.html
• SQL Cockpit
– http://www.cadaxo.com/content/en/products
– http://www.youtube.com/user/CadaxoGmbH
• Interesting SAP Notes – SQL Monitor: 1885926, 1806015, 1831460, …
– SAP Hana: 1812713, …
Cadaxo GmbH, found in 2009 in Vienna, Austria, is an
established, innovative SAP Consulting company, with the goal to
simplify everyday working life with SAP. www.cadaxo.com
SQL Cockpit – The best solution for Business-
users, Software-developers and Support! http://www.cadaxo.com/content/de/produkte.html
http://com.slideshare.net/cadaxogmbh
http://www.youtube.com/CadaxoGmbH http://www.linkedin.com/company/cadaxo-gmbh
https://twitter.com/cadaxo