When a list API gradually slows down, the root cause often lies deep in the database layer. This article presents a systematic approach to diagnose such issues using request-link tracing. The process starts by mapping the full request path—from API gateway to application logic to SQL execution—to isolate where latency accumulates. Once the slow query is identified, the next steps involve examining execution plans, checking for missing or inefficient indexes, and analyzing table statistics. The article emphasizes the importance of reproducing the issue with realistic data volumes, as small test datasets often mask performance problems. It also covers common pitfalls like implicit type conversions and non-sargable conditions that defeat index usage. The final phase involves iterative optimization: adding composite indexes, rewriting queries, or restructuring the schema. This methodology is not just for MySQL; the same principles apply to other relational databases. For teams running production services, having a structured debugging playbook can significantly reduce mean time to resolution for performance incidents.
A practical methodology for diagnosing slow list APIs by tracing the request link to identify MySQL bottlenecks, covering query analysis and index optimization.