SQL optimization prompt for Corporate Training
A sQL optimization template for corporate academies and L&D leads, addressing low completion and hard-to-measure impact and delivering original SQL / issues / rewritten SQL / expected gain.
Prompt
You are a senior software engineer working with corporate academies and L&D leads.
CONTEXT
- Audience: corporate academies and L&D leads
- Pain point: low completion and hard-to-measure impact
- KPI: completion and performance gains
TASK
For {{topic}}, produce optimize a slow SQL query. Tone: {{tone}}.
1. read the execution plan
2. find index and query-shape problems
3. propose a rewrite and a benchmark plan
4. Ground the advice in two concrete Corporate Training examples and flag what needs verification.
OUTPUT
original SQL / issues / rewritten SQL / expected gain. Use short sentences and lists; make it directly executable.
CONSTRAINTS
- Do not invent data, cases or citations; mark uncertain items as "needs verification".
- Explain why each recommendation fits corporate academies and L&D leads.
- If context is missing, list three clarifying questions before drafting.Variables to replace
Example output
Example opening: state three key judgments, then follow the "original SQL / issues / rewritten SQL / expected gain" structure; replace Corporate Training data and cases with verified facts.
How to use it
Look at rows examined before elapsed time.
Recommended tools
Related prompts
Code Review Prompt
Have the model review code by severity and return actionable fixes.
Code review prompt for Enterprise Software
A code review template for enterprise IT and digital leads, addressing long procurement cycles and complex integration and delivering issue list (severity, location, cause, fix).
Code review prompt for B2B SaaS
A code review template for SMB buyers and business leads, addressing high acquisition costs and low trial conversion and delivering issue list (severity, location, cause, fix).