Sql Optimization
Provides optimization guidance and assistance for working with databases and data persistence.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add chaterm-sql-optimization npx -- -y @trustedskills/chaterm-sql-optimization
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"chaterm-sql-optimization": {
"command": "npx",
"args": [
"-y",
"@trustedskills/chaterm-sql-optimization"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill optimizes SQL queries to improve database performance. It analyzes provided SQL statements and suggests modifications, such as adding indexes or rewriting joins, to reduce execution time. The goal is to enhance query efficiency without altering the intended result set.
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 a broader effort to improve overall database responsiveness.
- Query Optimization for Large Datasets: When dealing with large tables and complex queries that require significant processing power.
- Identifying Bottlenecks: To pinpoint inefficient SQL statements contributing to performance issues.
Key capabilities
- SQL query analysis
- Index suggestion
- Join rewriting suggestions
- Performance improvement recommendations
Example prompts
- "Optimize this SQL query:
SELECT * FROM orders WHERE customer_id = 123;" - "Can you suggest ways to improve the performance of this query?
...complex join statement..." - "Analyze this SQL and recommend any indexes that would speed it up."
Tips & gotchas
The skill's effectiveness depends on providing accurate and complete SQL queries. It is designed for standard SQL syntax; non-standard dialects may produce less reliable results.
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.