Fixing a slow page with indexes
Cursor's agent listed likely causes of a production-only slowdown, traced NestJS database queries, and recommended which database indexes to add.
After the author added the suggested indexes, page load performance improved significantly in production.
Overview
How it was set up
Cursor agent working inside the existing NestJS codebase, with the agent reading the database queries the app makes.
Worth knowing
The author warns that agent output needs careful review. Their python unit tests failed on bad mocks and needed manual fixes.
A prompt to start from
Our [system] is slow in production but fast in dev. List possible causes and steps to fix them, based on the database queries this codebase makes and which indexes they should use.Written by Agentic Feats from the source. Not the author's exact prompt.
Sources 1
History
- Source published
- 2026-01-05
- Added to Agentic Feats
- 2026-10-13
- Pick
- No
- Markdown copy
- /c/fixing-a-slow-page-with-indexes-cursor.md
More in coding
131 featsResult$28,335 spent, 9,350 commits across 145 repos, with spend up 7.4x in April after parallel git worktrees. Only 0.7% of tool calls ran overnight.
ResultOpus 5.5 recorded the repo's demo video itself using the record feature, and the author uses the tool constantly for debugging.
ResultA nightly workflow found a meteor on 25 October 2026. The bundled night detector found 95% of planes and 90% of meteors on held-out nights.