Investigate a slow request with evidence | DevPrompt Lab

Locate latency in the full request path before suggesting an optimization.

prompt · Performance · intermediate

English Tiếng Việt

A performance investigation prompt that uses traces, query plans, payload size, and measured workload.

Reusable content

Investigate the slow request using the available measurements. Map time across client, network, application, database, and external services. Identify the dominant measured contributor and distinguish it from correlation. Check query count, indexes, serialization, payload size, blocking work, and cache behavior as relevant. Recommend a change only when it addresses measured cost. Estimate how to verify the improvement and check for correctness or privacy trade-offs.

Slow path: {{SLOW_PATH}}

Trace or profile: {{TRACE}}

Workload: {{LOAD}}

Service objective: {{SLO}}

How to use it

Provide before-and-after measurements under comparable load. Remove credentials and private request bodies.

Example

Trace shows 180 ms in one unindexed locale lookup. Verify with EXPLAIN, add the scoped index, then compare p95 under the same dataset.