본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5845

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sql-optimization-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.md for 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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5845
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬