sql-optimization-patterns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SQL Optimization Patterns

SQL优化模式

Transform slow database queries into lightning-fast operations through systematic optimization, proper indexing, and query plan analysis.
通过系统化优化、合理索引和查询计划分析,将缓慢的数据库查询转变为闪电般快速的操作。

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
  • 调试运行缓慢的查询
  • 设计高性能数据库schema
  • 优化应用程序响应时间
  • 降低数据库负载与成本
  • 提升增长型数据集的可扩展性
  • 分析EXPLAIN查询计划
  • 实现高效索引
  • 解决N+1查询问题

Do not use this skill when

不适用场景

  • The task is unrelated to sql optimization patterns
  • You need a different domain or tool outside this scope
  • 任务与SQL优化模式无关
  • 需要该范围之外的其他领域或工具

Instructions

操作说明

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open
    resources/implementation-playbook.md
    .
  • 明确目标、约束条件和所需输入。
  • 应用相关最佳实践并验证结果。
  • 提供可执行步骤与验证方法。
  • 如果需要详细示例,请打开
    resources/implementation-playbook.md

Resources

资源

  • resources/implementation-playbook.md
    for detailed patterns and examples.
  • resources/implementation-playbook.md
    :包含详细模式与示例。