Skip to content
Back to skills

Sql Query Tuning

ASecurity

Use when a database query is slow or a page makes too many queries: reads the query plan, adds or adjusts indexes for the filters and sort order, removes N+1 patterns with joins or batched loads, and measures the query time before and after.

  • 1,567 stars
  • 0 votes
  • 2 copies
  • 5 views
  • Added November 26, 2026
ai-agentssqldatabase

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add autonomous-ai/openharness --skill sql-query-tuning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Query Tuning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql Query Tuning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/autonomous-ai-sql-query-tuning/badge)](https://www.skillsdirectory.com/skills/autonomous-ai-sql-query-tuning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sql-query-tuning
description: "Use when a database query is slow or a page makes too many queries: reads the query plan, adds or adjusts indexes for the filters and sort order, removes N+1 patterns with joins or batched loads, and measures the query time before and after."
---

Capture the exact query and its parameters, run EXPLAIN ANALYZE on realistic data, and look for sequential scans on large tables and sorts that spill. Add the narrowest index that serves the filter and the order. Replace per-row queries in loops with one batched query. Keep the numbers in the pull request.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.