Skip to main content
Manusで任意のスキルを実行
ワンクリックで

query-rewrite

スター3
フォーク0
更新日2026年6月16日 02:15

Rewrite a slow or inefficient SQL query for performance when an index alone won't fix it — full-table or per-row aggregates that should be rollups, SELECT * with deep pagination, redundant or accidental joins, ORM-generated CASE/subquery noise, or queries already using the right index but still scanning millions of rows. Because a safe rewrite depends on business meaning the SQL text does NOT carry (what a status code means, whether a column is effectively nullable, which columns the caller truly consumes, whether stale/approximate results are acceptable), this skill INTERVIEWS the domain owner with targeted questions before proposing anything, then validates that the rewrite preserves results and improves the plan. Use when the user wants to rewrite, refactor, simplify, or speed up a specific SQL query, or when find-impacting-queries hands off a "rewrite candidate". Triggers: "rewrite this query", "this query is slow and indexing didn't help", "simplify this SQL", "optimize this SELECT/JOIN", "make this aggr

インストール

Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。

SKILL.md
readonly