Effective prompting for query optimization
GreenGrid's daily energy report query has slowed from seconds to over 4 minutes as the sensor network grew past 10,000 panels. A developer asks AI to help by typing: "Make this query faster."
AI responds with generic advice: "Consider adding indexes, using LIMIT, and avoiding SELECT *."
The advice is technically valid but too generic to act on. The developer needs AI to identify the specific bottleneck in this query.
What change to the prompt would produce the most actionable optimization advice?
This exercise is part of the course
Advanced AI-Assisted Coding for Developers
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
Start Exercise