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 rmyndharis-sql-optimization-patterns npx -- -y @trustedskills/rmyndharis-sql-optimization-patterns
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"rmyndharis-sql-optimization-patterns": {
"command": "npx",
"args": [
"-y",
"@trustedskills/rmyndharis-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 a library of SQL optimization patterns. It helps identify and apply common techniques to improve query performance, such as indexing strategies, rewriting queries for efficiency, and analyzing execution plans. The goal is to reduce database load and improve application responsiveness by optimizing SQL code.
When to use it
- When troubleshooting slow-running reports or dashboards that rely on complex SQL queries.
- During the development of new features involving database interactions where performance is critical.
- To proactively review existing SQL codebases for potential optimization opportunities.
- When dealing with large datasets and needing to minimize query execution time.
Key capabilities
- Identification of inefficient SQL patterns.
- Suggestion of appropriate indexing strategies.
- Query rewriting recommendations.
- Analysis of query execution plans.
Example prompts
- "Analyze this SQL query:
SELECT * FROM orders WHERE customer_id = 123 AND order_date > '2023-01-01'and suggest optimizations." - "I'm seeing slow performance on a report that joins the
customersandorderstables. Can you recommend any indexing strategies?" - “Explain how to optimize this query for speed:
SELECT COUNT(*) FROM products WHERE price > 100”
Tips & gotchas
This skill requires access to the SQL queries being analyzed, ideally within a development or testing environment. The effectiveness of the recommendations depends on the complexity of the database schema and the specific workload.
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.