ERPClimb logoERPClimb

technicaladvancedChapter 6 / 21 · Lesson 3 / 3

Performance tracing, SQL and HANA analysis — Root-cause case, remediation and assessment

Prove the bottleneck using traces before proposing code or index changes.

Approx. 30 minutes · Guided practice + knowledge check

This incident case 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 and a six-step runbook, 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.

01Incident briefing: identify what really failed

An ABAP report is slow or data appears incorrect after query optimization. You are investigating a fictional case; the task is to prove which boundary is responsible without damaging business state.

FICTIONAL SAMPLE · READ-ONLY EVIDENCENever paste live customer data
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
Sample code, keys and log lines are authored for teaching; not captured from a productive SAP system.

02Separate facts from competing hypotheses

  1. EVIDENCE 1One item SELECT per order explains 1500 DB executions and substantial cumulative duration.
  2. EVIDENCE 2The single header lookup is not the bottleneck, even if its statement looks complex.
  3. EVIDENCE 3A set-based query can reduce round trips but may increase memory or change join semantics.

Which explanation is best supported by this evidence?

03Investigation runbook

  1. 01Define the exact measured report variant, client, user and representative dataset; capture outputs and elapsed time.
  2. 02Run a scoped ST05 SQL trace and SAT analysis; record top statements by cumulative duration and execution count.
  3. 03Identify the repeated VBAP lookup inside the order loop and verify that the trace corresponds to the relevant code.
  4. 04Design a set-based Open SQL retrieval or validated join that preserves item-level filtering and authorization checks.
  5. 05Re-run on matching data with controlled cache/time windows; compare DB requests, total runtime and memory.
  6. 06Diff resulting document keys, item counts and totals; keep a regression for customer/plant/authorization-filtered variants.

04Proof of a durable resolution

Limit performance traces to approved users/time windows. Never disable authorization, SQL client filters or productive indexes without DBA/change review.

  • Positive caseSame 1500 headers and 7800 item rows returned with identical business totals.
  • Negative caseA restricted-role user sees only permitted orders; the optimization doesn't leak client data.
  • Cross-process checkRepeated runs demonstrate reduced cumulative DB time without excessive memory use.

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.

Additional officially documented tools: SAP Learning — ABAP debugging. Confirm the documentation version for your system.