technicaladvancedChapter 6 / 21 · Lesson 1 / 3
Performance tracing, SQL and HANA analysis — Concepts and mental models
Prove the bottleneck using traces before proposing code or index changes.
Approx. 18 minutes · Guided practice + knowledge check
This concepts lesson covers “Performance tracing, SQL and HANA analysis”, a advanced technical troubleshooting topic. The symptom it starts from: An ABAP report is slow or data appears incorrect after query optimization. It follows a 3-phase evidence flow, references 5 tools (ST05, SAT, ST12 (where available), SQL Monitor, Plan analysis) and ends with a self-check question. All system data in the examples is fictional.
01Understand the execution or business process
Performance debugging begins with a repeatable baseline: same business input, same user, representative data volume and warm/cold cache condition. Average user impression is not a trace. Decompose total elapsed time into application, database, RFC and rendering costs.
Use ST05 to observe SQL statements and executions; SAT for ABAP runtime call costs; SQL Monitor for workload frequency where available. A SELECT inside a loop can multiply round trips. Large joins, incorrectly defined CDS association cardinality and missing predicates can also expand result sets.
A faster query is only a correct fix if authorization filtering, currency precision, client isolation and business semantics remain unchanged. Compare key count, row set and aggregates as well as timing.
- EVIDENCE PHASE 1Measure baseline duration and SQL workload
- EVIDENCE PHASE 2Inspect DB trace, call hierarchy and access plan
- EVIDENCE PHASE 3Verify correctness and response-time improvement
02Three mistakes that lead to false root causes
- The most expensive individual SQL statement is not always the biggest total cost; frequency matters.
- A CDS association can duplicate or omit records when cardinality assumptions are wrong.
- A cache-warmed single run is not defensible before-and-after performance evidence.
03Worked evidence sample
Read the fictional evidence, identify which boundary last succeeded, and predict the next safe diagnostic tool before moving to the guided investigation.
Synthetic ST05 extract: SELECT VBAK ... executions=1, duration=12ms SELECT VBAP WHERE VBELN=? ... executions=1500, total=6600ms Application runtime=7200ms, DB=6900ms Order count=1500; item rows expected=7800
04Choose the right tools and release context
ABAP Open SQL and CDS/HANA landscapes; SQL Monitor, SAT/ST05 and HANA plan access require authorized trace scope. Do not use a classic transaction code on a cloud edition unless it is supported by that environment and permitted for your role.
- ST05
- SAT
- ST12 (where available)
- SQL Monitor
- Plan analysis
05Check your diagnosis
A report runs 1500 identical item queries inside a loop. What is a likely first optimization hypothesis?
Select an answer to see the reasoning. This self-check is not a certification examination.
06Continue studying this SAP issue
The links below preserve the original published ERPClimb lessons in their own technical/functional modules. They supplement, not duplicate, this 22nd-module teaching page.
- Performance Part 1: Measuring with ST05, SAT and STAD
- Open SQL Part 8: Performance Analysis with ST05, SAT and SQL Monitor
- CDS Table Functions Part 4: Performance with HANA Plan Analysis
Additional officially documented tools: SAP Learning — ABAP debugging. Confirm the documentation version for your system.