sql-optimization-patterns
하는 일
이 도구는 데이터베이스 쿼리를 느리게 만드는 문제를 찾아 고치도록 돕습니다. 데이터베이스가 명령을 어떻게 실행하는지 분석하고, 인덱스 추가나 쿼리 재작성 같은 개선을 제안해 더 빠르게 만듭니다.
사용하는 경우
- ✓데이터베이스 쿼리의 응답이 너무 오래 걸릴 때.
- ✓성능을 위해 데이터베이스 구조를 설계하거나 조정할 때.
- ✓데이터베이스가 과부하 상태인 이유를 알고 부담을 줄이고 싶을 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sql-optimization-patterns/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“사용자를 가져오는 제 SQL 쿼리가 아주 느린데, 최적화하도록 도와주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 쿼리의 '실행 계획'을 분석합니다. 실행 계획이란 데이터베이스가 명령을 어떻게 실행하기로 결정하는지를 말합니다. 이를 바탕으로 인덱스 추가나 쿼리 재작성처럼 더 효율적으로 만드는 변경을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
SQL Optimization Patterns
Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.
Use this skill when
- Debugging slow-running queries
- Designing performant database schemas
- Optimizing application response times
- Reducing database load and costs
- Improving scalability for growing datasets
- Analyzing EXPLAIN query plans
- Implementing efficient indexes
- Resolving N+1 query problems
Do not use this skill when
- The task is unrelated to sql optimization patterns
- You need a different domain or tool outside this scope
Instructions
- Confirm database engine/version, query parameters, expected rows, data distribution and the permitted environment. Start read-only; obtain authorization before DDL, data changes, configuration changes or maintenance.
- Compare result sets before comparing performance. EXPLAIN ANALYZE executes the statement: use approved representative data, account for functions and triggers, and do not assume a transaction rollback undoes every side effect.
- Record the observed plan, timing conditions and correctness checks. Indexes and query rewrites are hypotheses, not universal speed improvements.
- If detailed examples are required, open
resources/implementation-playbook.md.
Resources
resources/implementation-playbook.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Worked example
The playbook includes an executable SQLite batch-loading example with bound values and an empty-input case. The repository test exercises it alongside pagination ties and aggregation equivalence. SQLite correctness checks do not establish PostgreSQL performance or production safety.
자주 묻는 질문
「실행 계획」이란 무엇인가요?
데이터베이스가 요청한 데이터를 찾아 반환하는 경로입니다. 이를 분석하면 병목이 어디인지 알 수 있습니다.
「인덱스」란 무엇인가요?
책의 색인과 같습니다. 모든 것을 읽지 않고도 데이터베이스가 특정 정보를 훨씬 빨리 찾도록 돕습니다.
이 도구가 제 데이터베이스를 바꾸나요?
직접 바꾸지는 않습니다. 변경을 제안하고, 어떤 수정을 하기 전에는 사용자의 승인을 요청하며, 읽기 전용 분석부터 시작합니다.
상세 정보
작성자의 원본 설명
Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.
인기도
- GitHub 스타
- 48k
- 순위
- #5845
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.