# Expected Diagnosis: sql-tail-latency-spike-during-incident-window

This case should converge on a TiDB heap-retention and GC-pressure path rather
than stopping at the trigger workload alone.

The expected answer should make these points explicit:

- The incident is not fully explained by a slow query or stale statistics by
  themselves; the dominant differentiator is abnormal TiDB heap retention and GC
  pressure.
- The diagnosis should use GC metrics as a pivot into heap-profile evidence,
  then connect the dominant memory stack to the latency symptom.
- A correct answer should separate trigger workload evidence from the final
  runtime or product failure mode.
- Recommendations should include a fixed-version path and a short-term mitigation
  for the problematic execution path, plus profiling follow-up.
