Community연구 & 데이터 분석github.com

github/sql-optimization

범용 SQL 성능 최적화 도우미로, 모든 SQL 데이터베이스(MySQL, PostgreSQL, SQL Server, Oracle)에 걸쳐 포괄적인 쿼리 튜닝, 인덱싱 전략 및 데이터베이스 성능 분석을 제공합니다. 실행 계획 분석, 페이지네이션 최적화, 배치 작업 및 성능 모니터링 지침을 포함합니다.

sql-optimization란 무엇인가요?

이 스킬은 다양한 SQL 데이터베이스(MySQL, PostgreSQL, SQL Server, Oracle)에서 쿼리 성능을 최적화하기 위한 범용 도우미입니다. AI 어시스턴트(예: Claude Code, Cursor, Codex)와 함께 사용하여 SQL 쿼리 튜닝, 인덱스 전략 수립, 실행 계획 분석, 페이지네이션 최적화, 배치 작업 개선 및 성능 모니터링을 수행할 수 있습니다. 개발자는 복잡한 쿼리 문제를 해결하고 데이터베이스 성능 병목 지점을 식별하며, 최적화된 SQL 패턴을 제안받아 애플리케이션 응답 시간을 단축할 수 있습니다. 이 스킬은 특정 데이터베이스에 국한되지 않으며, SQL 표준과 각 데이터베이스 고유 기능을 모두 고려한 최적화 조언을 제공합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/github/awesome-copilot/tree/main/skills/sql-optimization

Installed? Explore more 연구 & 데이터 분석 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

sql-optimization은(는) 무엇을 하나요?

범용 SQL 성능 최적화 도우미로, 모든 SQL 데이터베이스(MySQL, PostgreSQL, SQL Server, Oracle)에 걸쳐 포괄적인 쿼리 튜닝, 인덱싱 전략 및 데이터베이스 성능 분석을 제공합니다. 실행 계획 분석, 페이지네이션 최적화, 배치 작업 및 성능 모니터링 지침을 포함합니다.

주요 기능

  • 쿼리 튜닝: 느린 쿼리 식별 및 리팩토링 제안
  • 인덱스 전략: 인덱스 설계, 추가, 제거 최적화
  • 실행 계획 분석: EXPLAIN 또는 EXPLAIN ANALYZE 출력 해석
  • 페이지네이션 최적화: 오프셋 기반 페이지네이션 대신 커서 기반 페이지네이션 권장
  • 배치 작업 최적화: 대량 데이터 처리 시 효율적인 배치 전략 제안
  • 성능 모니터링: 데이터베이스 성능 지표 분석 및 모니터링 설정 지침

지원 데이터베이스

데이터베이스실행 계획 명령어특이사항
MySQLEXPLAIN, EXPLAIN ANALYZEInnoDB 버퍼 풀 크기 조정 고려
PostgreSQLEXPLAIN ANALYZEpg_stat_statements 확장 활용
SQL ServerSET SHOWPLAN_XML ON인덱스 힌트 및 쿼리 힌트 지원
OracleEXPLAIN PLAN FOR힌트 기반 최적화(Hint-Based Optimization)

사용 예시

1. 느린 쿼리 진단

다음과 같은 쿼리가 있다고 가정해 봅시다:

SELECT *
FROM orders o
JOIN order_items oi ON o.id = oi.order_id
WHERE o.created_at > '2024-01-01'
ORDER BY o.created_at DESC
LIMIT 10 OFFSET 1000;

이 스킬은 다음을 제안합니다:

  • o.created_at에 인덱스 추가
  • 오프셋 기반 페이지네이션 대신 커서 기반 페이지네이션 사용
  • SELECT * 대신 필요한 컬럼만 선택

2. 실행 계획 분석

MySQL 예시:

EXPLAIN ANALYZE
SELECT * FROM users WHERE email = '[email protected]';

출력:

-> Index lookup on users using idx_email (cost=0.35 rows=1) (actual time=0.015..0.016 rows=1)

분석: 인덱스가 효과적으로 사용됨. 추가 최적화 불필요.

최적화 원칙

  1. 인덱스 최우선: 인덱스는 쿼리 성능 향상의 첫 번째 단계입니다.
  2. 실행 계획 확인: 쿼리 최적화 전후로 반드시 실행 계획을 확인합니다.
  3. 데이터 분포 이해: 통계 정보를 활용하여 인덱스 선택성을 평가합니다.
  4. 테스트 환경: 프로덕션에 적용 전, 테스트 환경에서 충분히 검증합니다.
  5. 모니터링: 지속적인 성능 모니터링을 통해 회귀를 조기에 발견합니다.

자주 묻는 질문

Q: 모든 데이터베이스에서 동일한 최적화가 적용되나요? A: 아니요. 각 데이터베이스는 고유한 최적화 기능과 특성을 가집니다. 예를 들어, PostgreSQL은 부분 인덱스와 BRIN 인덱스를 지원하지만, MySQL은 지원하지 않습니다.

Q: 인덱스 추가가 항상 성능을 향상시키나요? A: 아니요. 과도한 인덱스는 INSERT, UPDATE, DELETE 성능을 저하시킬 수 있습니다. 인덱스 추가는 트레이드오프를 고려해야 합니다.

참고 자료

이 설명서는 지속적으로 업데이트됩니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

github/acquire-codebase-knowledge

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

github/add-educational-comments

Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.

github/agent-governance

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

github/agentic-eval

Patterns and techniques for evaluating and improving AI agent outputs. Use this skill when: - Implementing self-critique and reflection loops - Building evaluator-optimizer pipelines for quality-critical generation - Creating test-driven code refinement workflows - Designing rubric-based or LLM-as-judge evaluation systems - Adding iterative improvement to agent outputs (code, reports, analysis) - Measuring and improving agent response quality

github/agent-owasp-compliance

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

github/ai-prompt-engineering-safety-review

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations with extensive frameworks, testing methodologies, and educational content.

github/appinsights-instrumentation

Instrument a webapp to send useful telemetry data to Azure App Insights

github/apple-appstore-reviewer

Serves as a reviewer of the codebase with instructions on looking for Apple App Store optimizations or rejection reasons.

github/architecture-blueprint-generator

Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.

github/arch-linux-triage

Triage and resolve Arch Linux issues with pacman, systemd, and rolling-release best practices.

github/arize-ai-provider-integration

Creates, reads, updates, and deletes Arize AI integrations that store LLM provider credentials used by evaluators and other Arize features. Supports any LLM provider (e.g. OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Vertex AI, Gemini, NVIDIA NIM). Use when the user mentions AI integration, LLM provider credentials, create integration, list integrations, update credentials, delete integration, or connecting an LLM provider to Arize.

github/arize-annotation

Creates and manages annotation configs (categorical, continuous, freeform label schemas) and annotation queues (human review workflows) on Arize. Applies human annotations to project spans via the Python SDK. Use when the user mentions annotation config, annotation queue, label schema, human feedback, bulk annotate spans, update_annotations, labeling queue, annotate record, or human review.

github/arize-dataset

Creates, manages, and queries Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI. Use when the user needs test data, evaluation examples, or mentions create dataset, list datasets, export dataset, append examples, dataset version, golden dataset, or test set.

github/arize-evaluator

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

github/arize-experiment

Creates, runs, and analyzes Arize experiments for evaluating and comparing model performance. Covers experiment CRUD, exporting runs, comparing results, and evaluation workflows using the ax CLI. Use when the user mentions create experiment, run experiment, compare models, model performance, evaluate AI, experiment results, benchmark, A/B test models, or measure accuracy.

github/arize-instrumentation

Adds Arize AX tracing to an LLM application for the first time. Follows a two-phase agent-assisted flow to analyze the codebase then implement instrumentation after user confirmation. Use when the user wants to instrument their app, add tracing from scratch, set up LLM observability, integrate OpenTelemetry or openinference, or get started with Arize tracing.

github/arize-link

Generates deep links to the Arize UI for traces, spans, sessions, datasets, labeling queues, evaluators, and annotation configs. Produces clickable URLs for sharing Arize resources with team members. Use when the user wants to link to or open a trace, span, session, dataset, evaluator, or annotation config in the Arize UI.

github/arize-prompt-optimization

Optimizes, improves, and debugs LLM prompts using production trace data, evaluations, and annotations. Extracts prompts from spans, gathers performance signal, and runs a data-driven optimization loop using the ax CLI. Use when the user mentions optimize prompt, improve prompt, make AI respond better, improve output quality, prompt engineering, prompt tuning, or system prompt improvement.

github/arize-trace

Downloads, exports, and inspects existing Arize traces and spans to understand what an LLM app is doing or debug runtime issues. Covers exporting traces by ID, spans by ID, sessions by ID, and root-cause investigation using the ax CLI. Use when the user wants to look at existing trace data, see what their LLM app is doing, export traces, download spans, investigate errors, or analyze behavior regressions.

github/aspire

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

관련 스킬