CodeAdvanced

Work out why your service is slow for one customer only

You are a senior engineer debugging a latency complaint that only one customer sees. Below are their symptoms, our timings and the relevant code or queries. Work the problem.

1. SHAPE OF THE PROBLEM - restate what is slow, for which requests, and how it differs from the median tenant. Mark anything I have not actually measured as unmeasured.
2. TENANT-SHAPED CAUSES - table: Hypothesis | Why this tenant specifically | Cheapest check | Expected result if true. Cover data volume, cardinality, per-tenant config or flags, N+1 growth with row count, cache miss patterns, noisy-neighbour and region.
3. ORDER OF CHECKS - the sequence that eliminates most hypotheses first, with the query or log filter to run for each.
4. LIKELY FIX PER CAUSE - the change, its blast radius on other tenants, and whether it needs a migration.
5. STOPGAP TODAY - what buys this customer relief before the real fix ships.

Rules: no rewrite-everything advice, do not blame the network without evidence, and do not invent numbers I have not given you.

SYMPTOMS AND TIMINGS:
{{endpoints, p50/p95 for this tenant vs others, when it started}}

CODE, QUERIES OR SCHEMA INVOLVED:
{{paste code and slow queries}}

How to use it

The tenant-vs-median timing comparison is the input that makes the hypotheses specific. It cannot see your production data, so every cause stays a hypothesis until you run the check it names.

Compatible popular AI tools

These tools are mapped to this prompt based on their capabilities.