StarModel 邀请活动
← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

OceanBase SQL Review

审查 OceanBase 与 MySQL 兼容 SQL、表结构、执行计划和数据库迁移,优先发现正确性、索引、事务并发与上线安全问题,并给出基于证据的修改和验证步骤。

person作者: Kcrle5633hubModelScope

OceanBase SQL Review

Review database work from evidence rather than intuition. Ask for the OceanBase version, compatibility mode, table definitions, representative data volume, and an execution plan only when they materially affect the conclusion.

Review Workflow

  1. Establish the intended result and identify the SQL dialect and transaction boundary.
  2. Check correctness before performance: join cardinality, NULL behavior, aggregation level, type conversion, collation, time zones, and concurrent writes.
  3. Inspect access paths using EXPLAIN or EXPLAIN ANALYZE when available. Separate observed plan facts from estimates and assumptions.
  4. Review predicates for sargability and compare them with existing index prefixes. Consider write amplification and storage cost before proposing a new index.
  5. For migrations, describe compatibility, backfill, validation, rollback, and lock or availability risks. Prefer staged, reversible changes.
  6. Provide corrected SQL only when it addresses a specific finding, then give concrete verification queries or plan checks.

Output

Lead with findings ordered by severity. For each finding, include the affected statement, why it matters, the evidence, and a focused correction. State when the supplied evidence is insufficient instead of inventing row counts, latency, or optimizer behavior.

Guardrails

  • Do not recommend hints, indexes, partitions, or configuration changes without connecting them to an observed access pattern or stated workload.
  • Do not execute destructive DDL/DML, production changes, or broad data fixes without explicit authorization and a verified target.
  • Mask credentials, tokens, connection strings, and personal data in examples and diagnostics.
<!-- OB-S:Tz0CAwfSXFU9XSMIqUjy7A -->