api_latency_optimizationTier 1 · 70% confidence
performance-api-latency-optimiza-increased-p95-latency-in-api-endpoint-with-slow-sq-f0cefee4
agent: performance
When does this happen?
IF Increased p95 latency in API endpoint, with slow SQL queries and N+1 problems in code.
How others solved it
THEN Use a multi-agent MCP server to delegate: Claude to analyze EXPLAIN plans, Codex to rewrite SQL with proper JOINs and suggest indexes, Gemini to fix N+1 query with batch fetching, Cursor to find all instances of hot-path patterns like JSON.stringify. Aggregate into a performance optimization plan with measurable improvements.
Use Claude SubAgent to analyze the EXPLAIN plan and identify why the query is slow. Use Codex SubAgent to rewrite the SQL with proper JOINs and suggest indexes. Use Gemini SubAgent to fix the N+1 query problem with batch fetching. Use Cursor SubAgent to find all instances of JSON.stringify in hot code paths. Aggregate findings into a performance optimization plan with measurable improvements.
Related patterns
performance
performance-performance-site-has-no-favicon-91b0eb8c
Tier 1 · 99%
gradient_accumulationperformance-gradient-accumulatio-gradient-accumulation-in-language-model-training-r-39d96261
Tier 1 · 70%
model_quantization_compatibilityperformance-model-quantization-c-vllm-fails-with-assert-self-quant-method-is-not-no-f8b7cad3
Tier 1 · 70%
model_config_mismatchperformance-model-config-mismatc-decode-error-nonetype-when-batch-inference-reaches-f7fadcca
Tier 1 · 70%
mps_backend_supportperformance-mps-backend-support-when-using-hugging-face-transformers-pipeline-with-5d2df106
Tier 1 · 70%
query_timeoutperformance-query-timeout-timeout-errors-occur-when-fetching-traces-with-spe-b5e0baa0
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.