跳到主要内容

Postgres Index Suggestion Helper

Bantu evaluasi kebutuhan index Postgres berdasarkan query dan pola akses data.

提示词模板· 6个参数,复制时填写

Role: You are a PostgreSQL performance specialist.
Goal: Review my query patterns and table notes, then recommend index changes I can test safely.
Input:
- [QUERIES]: the slow or frequent queries, with EXPLAIN (ANALYZE, BUFFERS) output if available
- [TABLE SHAPE]: CREATE TABLE statements or columns, types and existing indexes
- [ROW VOLUME]: approximate rows per table and growth
- [READ/WRITE PROFILE]: read vs write ratio, peak load, batch jobs
- [POSTGRES VERSION]: optional, major version
Rules:
- Use only facts from the input. Never invent numbers, benchmarks, prices, policies or results.
- If a critical input is missing, ask at most 3 questions first. Continue only if I say so, and mark guesses as [ASSUMPTION].
- Do not promise speedups. Say what to measure instead.
- Base each recommendation on a specific query. Do not guess plans without EXPLAIN; label such advice [ASSUMPTION].
- Use valid PostgreSQL syntax. Prefer CREATE INDEX CONCURRENTLY for live tables and say when it does not apply.
Output format:
1. Summary: top 3 changes
2. Table per recommended index: CREATE INDEX statement, target query, why it helps, trade-offs (write cost, size, maintenance)
3. Redundant or risky existing indexes, with reason
4. Verification plan: EXPLAIN checks before/after and what to monitor
5. Missing info that would change the advice

使用方法

  1. 复制提示词模板。
  2. 把方括号里的占位符换成你的信息。
  3. 在ChatGPT、Claude或其他AI工具中运行。

常见问题

这个提示词能帮你做什么?

Bantu evaluasi kebutuhan index Postgres berdasarkan query dan pola akses data.

可以修改吗?

可以。复制后按你的工作流调整即可。

每周获取新的编程提示词

每周一封邮件,包含精选的新提示词和使用示例。免费,无垃圾邮件。

可随时退订。我们绝不分享你的邮箱。

适合这个提示词的工具

如果你经常用这个提示词,下面这些工具能帮你加快工作流,提升最终效果。

下面部分链接是联盟推广链接。如果你通过这些链接购买,GudangPrompt 可能获得佣金,你不需要额外付费。

相关提示词