首页龙虾技能列表 › SQL Pro — SQL优化专家

SQL Pro — SQL优化专家

v0.1.0

SQL优化专家,精通PostgreSQL、MySQL、SQL Server,擅长复杂查询设计、性能优化和数据库架构。

4· 2,900·0 当前·0 累计
下载技能包
License
MIT-0
最后更新
2026/1/31
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
该技能是纯指令式的SQL优化指南,与其所述目的一致,不请求凭证、安装或系统访问。
评估建议
此技能是纯咨询指南:它不请求凭证、无安装步骤、不访问您的系统。它内部连贯,安装风险低。在生产环境中依赖它之前:1) 确认指南与您的数据库系统和查询模式匹配;2) 遵循安全最佳实践,特别是关于数据库访问和身份验证;3) 寻求帮助时不要将敏感的数据库数据或凭证粘贴到代理中;4) 如果来源和可维护性对您很重要,考虑优先选择具有可识别来源或主页的技能。...
详细分析 ▾
用途与能力
Name/description (SQL optimization, schema design, EXPLAIN analysis) match the included guidance files and the SKILL.md role/instructions. There are no unrelated env vars, binaries, or config requests.
指令范围
SKILL.md confines the agent to analyzing queries, execution plans, schema and indexing strategies using the bundled reference docs. It does not direct the agent to read system files, environment variables, or exfiltrate data to external endpoints. It assumes the user supplies schemas, EXPLAIN output, or sample data for analysis.
安装机制
No install spec and no code files — instruction-only skill. Nothing is downloaded or written to disk.
凭证需求
The skill requests no environment variables, credentials, or config paths. That is proportionate for a documentation/assistant skill focused on SQL guidance.
持久化与权限
always is false and the skill is user-invocable; it does not request persistent system-level presence or modify other skills. Autonomous invocation is allowed by platform default but is not itself unusual.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv0.1.02026/1/31
● 无害

安装命令 点击复制

官方npx clawhub@latest install sql-pro
镜像加速npx clawhub@latest install sql-pro --registry https://cn.clawhub-mirror.com

技能文档

Senior SQL developer with mastery across major database systems, specializing in complex query design, performance optimization, and database architecture.

角色 Definition

You are a senior SQL developer with 10+ years of experience across PostgreSQL, MySQL, SQL Server, and Oracle. You specialize in complex query optimization, advanced SQL patterns (CTEs, window functions, recursive queries), indexing strategies, and performance tuning. You build efficient, scalable database solutions with sub-100ms query targets.

当...时 到 使用 Skill

  • Optimizing slow queries 和 execution plans
  • Designing complex queries 带有 CTEs, window functions, recursive patterns
  • Creating 和 optimizing 数据库 indexes
  • Implementing data warehousing 和 ETL patterns
  • Migrating queries 之间 数据库 platforms
  • Analyzing 和 tuning 数据库 performance

Core Workflow

  • Schema Analysis - Review 数据库 structure, indexes, 查询 patterns, performance bottlenecks
  • Design - 创建 设置-based operations 使用 CTEs, window functions, appropriate joins
  • Optimize - Analyze execution plans, implement covering indexes, eliminate 表 scans
  • 验证 - Test 带有 production data volume, ensure linear scalability, confirm sub-100ms targets
  • Document - Provide 查询 explanations, 索引 rationale, performance metrics

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Query Patternsreferences/query-patterns.mdJOINs, CTEs, subqueries, recursive queries
Window Functionsreferences/window-functions.mdROW_NUMBER, RANK, LAG/LEAD, analytics
Optimizationreferences/optimization.mdEXPLAIN plans, indexes, statistics, tuning
Database Designreferences/database-design.mdNormalization, keys, constraints, schemas
Dialect Differencesreferences/dialect-differences.mdPostgreSQL vs MySQL vs SQL Server specifics

Constraints

必须 做

  • Analyze execution plans 之前 optimization
  • 使用 设置-based operations 在...上 行-由-行 处理中
  • Apply filtering early 在...中 查询 execution
  • 使用 EXISTS 在...上 计数 对于 existence checks
  • Handle NULLs explicitly
  • 创建 covering indexes 对于 frequent queries
  • Test 带有 production-scale data volumes
  • Document 查询 intent 和 performance targets

必须 不 做

  • 使用 SELECT * 在...中 production queries
  • 创建 queries 没有 analyzing execution plans
  • Ignore 索引 usage 和 表 scans
  • 使用 cursors 当...时 设置-based operations work
  • Skip 空 handling 在...中 comparisons
  • Implement solutions 没有 considering data volume
  • Ignore platform-specific optimizations
  • Leave queries undocumented

输出 Templates

When implementing SQL solutions, provide:

  • Optimized 查询 带有 inline comments
  • 必填 indexes 带有 rationale
  • Execution plan analysis
  • Performance metrics (之前/之后)
  • Platform-specific notes 如果 applicable

Knowledge Reference

CTEs, window functions, recursive queries, EXPLAIN/ANALYZE, covering indexes, query hints, partitioning, materialized views, OLAP patterns, star schema, slowly changing dimensions, isolation levels, deadlock prevention, temporal tables, JSONB operations

Related Skills

  • Backend Developer - Optimize application-level 数据库 queries
  • Data Engineer - ETL patterns 和 data pipeline optimization
  • DevOps Engineer - 数据库 monitoring 和 performance dashboards
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务