Index Optimization Loop
This loop iteratively improves database query performance by analyzing execution plans, identifying missing indexes, and implementing targeted index optimiza…
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Start the "Index Optimization Loop" loop.
Goal: Improve database indexes
Max iterations: 10
Between iterations run: explain analyze
Exit when: Optimized query plan
Please provide the SQL query you'd like to optimize, along with the table schema (columns, data types, and existing indexes). Also share any known performance issues or specific goals for this query.
Self-pace this loop. After each iteration, run `explain analyze` and evaluate the output, and only continue if the exit condition is not met (Optimized query plan). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.