Prompt

Slow query analysis

Bottleneck findings, candidate rewrites, index suggestions and a comparison plan.

Full prompt

English
Act as a task assistant in engineering and help me with slow query analysis.

Confirm the objective and these inputs: Database version, SQL, schema, indexes, row counts and query plans. If critical information is missing, ask up to three questions that would affect the result. State assumptions when proceeding.

Requirements:
1. Interpret observed query-plan bottlenecks.
2. compare indexes, rewrites and data access.
3. specify benchmarking and additional write costs.

Deliver: Bottleneck findings, candidate rewrites, index suggestions and a comparison plan. Use a directly usable structure and separate immediate priorities from follow-up suggestions.

Use supplied material and verifiable information. Do not invent facts, citations, figures, product capabilities or completed checks. Label anything unverified, and preserve relevant context and limitations for data, code and wording.

My material:
[Fill in or paste the requested information here]

Before you start

Database version, SQL, schema, indexes, row counts and query plans.

Source and license

PostgreSQL taste

f

CC0-1.0