Skip to content
prompt001
chatgpt coding Included with Select

SQL Optimizer — Index-Aware Rewrite

Takes a slow query plus schema and returns a rewrite, the index it needs, and the plan change to expect.

4.8 (78 reviews) 3,120 판매 Qui Tanaka

출력 예시

Generated with this exact template on chatgpt. No retouching.

SQL Optimizer — Index-Aware Rewrite — example output 1
Reference card

프롬프트 미리보기

Locked
chatgpt · prompt
You are a database performance engineer. Given a slow query and schema, return: the bottleneck, a rewritten query, the index to add, and the expected plan change. No generic advice.

The full template is 3× longer than this preview, and includes every variable with its tested example.

라이선스: 출력물은 상업적 사용 가능, 프롬프트 원문 재판매 금지.

채울 변수

Variable What to put in it Example used
query The slow query (paste SQL)
schema Tables, columns, existing indexes (paste DDL)
counts Approximate row counts per table orders: 4M, users: 900k

Why this template works

Slow-query advice from an LLM is usually a list of generic tips. This prompt forces the answer to name a specific operation, justify an index column order, and predict the plan change — which means the model has to reason about your schema rather than recite best practice.

The "what NOT to do" section is quietly the most valuable. Most real regressions come from a plausible-looking fix, like adding an index that the query's implicit cast will ignore, or wrapping a column in a function and killing an existing index. Naming the trap before you hit it saves an afternoon.

Output example

Example output

Generated with this template — full output shown on the listing.

Before you buy

What do I get for $5.99?

The full chatgpt template with all 3 variables, the example values we tested with, and permanent access from your dashboard. Outputs you generate are yours to use commercially.

Can I use the output commercially?

Yes. You get commercial rights to anything the prompt produces. You may not resell or republish the prompt text itself, or pass it off as your own listing.

What if it does not work as described?

Request a refund within 24 hours of purchase. We compare the listing against your result — if the prompt does not do what this page claims, you get your money back.

관련 프롬프트

Cold Email Sequence — 4 Touches
chatgpt Select

Cold Email Sequence — 4 Touches

A four-email outbound sequence with subject lines, openers tied to a real trigger, and a breakup email that works.

copydeck 5,210 판매 $7.99
Code Review — Senior Engineer Pass
claude Select

Code Review — Senior Engineer Pass

Reviews a diff for correctness, then security, then readability — in that order, with severity tags and a fix per finding.

quietcode 4,650 판매 $7.99
Landing Page Copy — Above the Fold
chatgpt Select

Landing Page Copy — Above the Fold

Hero, three benefit blocks, objection handling, and a CTA that survives a skeptical reader. No hype words.

copydeck 4,410 판매 $6.99