SQL Query Optimizer

# SQL Query Optimizer

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "SQL Query Optimizer" with this command: npx skills add honestqiao/sql-query-optimizer

SQL Query Optimizer

分析并优化 SQL 查询,提升数据库性能。

功能

  • 查询性能分析
  • 索引建议
  • 执行计划解读
  • SQL 优化建议

触发词

  • "SQL优化"
  • "查询优化"
  • "sql optimization"
  • "慢查询"

检测问题

-- 检测 SELECT * 问题
SELECT * FROM users WHERE id = 1;

-- 检测缺少 LIMIT
SELECT name FROM users;

-- 检测前导通配符
SELECT * FROM users WHERE name LIKE '%john%';

优化建议

  1. 避免 SELECT *,只查询需要的列
  2. 添加 WHERE 条件和 LIMIT
  3. 避免 LIKE 前导通配符
  4. 使用索引列
  5. 避免嵌套子查询
  6. 使用 EXPLAIN 分析执行计划

输出示例

{
  "original": "SELECT * FROM users WHERE name LIKE '%john%'",
  "suggestions": [
    "避免使用 SELECT *,只查询需要的列",
    "避免 LIKE 前导通配符",
    "添加 LIMIT 限制返回数量"
  ],
  "optimized": "SELECT id, name FROM users WHERE name LIKE '%john%' LIMIT 100"
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

Ontology Engineer

Extract candidate ontology models from enterprise business systems AND build/maintain personal knowledge graphs from any file system. Use when: ontology extr...

Registry SourceRecently Updated
5200Profile unavailable
General

database-admin

提供数据库表结构设计、数据批量操作、复杂查询优化、类型处理及事务安全的全面数据库管理服务。

Registry SourceRecently Updated
7970Profile unavailable
General

NEXUS Text To Sql

Convert natural language to optimized SQL queries

Registry SourceRecently Updated
3910Profile unavailable
General

SQL Data Analyst

Natural language to SQL. Ask questions about your data in plain English, get queries, results, and explanations. Supports SQLite, PostgreSQL, and MySQL. Impo...

Registry SourceRecently Updated
4581Profile unavailable