Capstone C — Performance forensics
What you'll learn
Measure top-down — SAT for the hot blocks, ST05 for the bad statements, PLANVIZ for each plan — then choose index, hint, CDS rewrite, or AMDP rewrite, and prove it with an acceptance test against the old runtime.
- Start with SAT to find the time-dominant blocks (ABAP versus database).
- Use ST05 to trace the SQL and surface the offending statements.
- Run PLANVIZ per offender to read the actual per-statement execution plan.
The scenario: a nightly batch job that ran in eight minutes before HANA now takes thirty-five, and you must walk a defensible diagnostic path rather than guess at a fix. The discipline is to measure top-down — find where the time goes before deciding what to change — because the obvious culprit is rarely the real one on a columnar engine.
The path moves from coarse to fine. SAT profiles the runtime and surfaces the time-dominant blocks, telling you whether the cost is in ABAP processing or in database access. If it is the database, ST05 traces the SQL and names the offending statements. PLANVIZ then shows the per-statement execution plan for each offender, exposing the actual operator tree — a full column scan, an unexpected nested-loop join, a missing pushdown.
Only with the plan in hand do you reach the decision tree, and the order reflects rising cost and risk: an index where a scan should be a lookup; a hint where the optimizer needs a nudge; a CDS rewrite to push the logic down declaratively; or, last, an AMDP rewrite when only SQLScript can express it. Every chosen fix is paired with an acceptance test plan that re-measures against the eight-minute baseline, so 'fixed' is proven, not asserted.
Key points
- Start with SAT to find the time-dominant blocks (ABAP versus database).
- Use ST05 to trace the SQL and surface the offending statements.
- Run PLANVIZ per offender to read the actual per-statement execution plan.
- Apply the decision tree in rising order: index, hint, CDS rewrite, AMDP rewrite.
- Pair the fix with an acceptance test plan that re-measures against the original baseline.
Source notes: clean-core-curriculum §14.3
Ask Claude
Build a prompt from this lesson + your question and open a fresh Claude chat with it pre-filled — handy for adapting a before/after pattern to your own object.