Sql Optimization Patterns
Helps with optimization, patterns as part of working with databases and data persistence workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add aaaaqwq-sql-optimization-patterns npx -- -y @trustedskills/aaaaqwq-sql-optimization-patterns
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"aaaaqwq-sql-optimization-patterns": {
"command": "npx",
"args": [
"-y",
"@trustedskills/aaaaqwq-sql-optimization-patterns"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides AI agents with the ability to identify and suggest SQL optimization patterns. It can analyze existing queries, pinpoint performance bottlenecks, and recommend improvements such as indexing strategies, query rewriting, or data type adjustments. The goal is to enhance database query efficiency and reduce execution time.
When to use it
- Slow Query Analysis: When a specific SQL query takes an unexpectedly long time to execute.
- Database Performance Tuning: As part of regular maintenance to proactively improve overall database performance.
- Query Optimization Recommendations: To get suggestions for improving the efficiency of complex or frequently executed queries.
- Identifying Indexing Opportunities: To discover missing indexes that could significantly speed up query execution.
Key capabilities
- SQL Query Analysis
- Performance Bottleneck Identification
- Indexing Strategy Suggestions
- Query Rewriting Recommendations
- Data Type Adjustment Proposals
Example prompts
- "Analyze this SQL query:
SELECT * FROM orders WHERE customer_id = 123;and suggest optimizations." - "I have a slow-running report. Can you identify potential SQL optimization patterns?"
- "Suggest indexes for the following table schema: [table schema details]"
Tips & gotchas
The skill's effectiveness depends on providing accurate and complete SQL query information, including table schemas when possible. It is not a replacement for thorough database administration but can be a valuable tool for identifying common optimization opportunities.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.