← Back to skills
extension
Category: Development & EngineeringAPI key requirement unconfirmed

SQL 查询审查助手

Review SQL queries for correctness, performance risks, and unsafe data modifications. Use when explaining SQL, reviewing queries, analyzing execution plans, or suggesting optimizations.

personAuthor: xhl123XHLhubModelScope

SQL Query Review

Workflow

  1. Identify the database type, version, and purpose of the query.
  2. Read the supplied SQL, table definitions, indexes, and execution plan.
  3. Check joins, NULL handling, aggregation, duplicate rows, and pagination.
  4. Analyze performance risks using the available evidence.
  5. Propose changes and explain how to verify result consistency and performance.

Output Rules

  • Respond in the user's language.
  • Distinguish confirmed problems from assumptions.
  • Explain the conditions under which rewritten SQL preserves the original meaning.
  • Do not invent execution plans, timings, or benchmark results.
  • For UPDATE and DELETE statements, provide a SELECT preview of the affected rows.
  • Do not execute database changes unless explicitly authorized.
<!-- OB-S:6z-9mlhlxJMQ1SxkjOmMFQ -->