# PostgreSQL investigation worksheet

Blank working document. Replace placeholders with your own evidence; an empty field is unknown, not a passing result.

Owner: [fill in]
Source revision: [fill in]
Environment: [fill in]
Evidence date: [fill in]

## Workload

Engine/version: ___
SQL and parameter sample: ___
Schema snapshot: ___
Dataset size/distribution source: ___
Role and allowed operations: ___

## Baseline

Saved plan path: ___
Was ANALYZE executed: ___
Execution environment and cache state: ___
Observed timing/rows with source: ___
Missing workload evidence: ___

## Proposal

Bottleneck supported by plan: ___
Query or index diff: ___
Result-equivalence cases: ___
Write/lock/storage trade-offs: ___

## Validation and rollout

Test command and observed result: not run
Before/after evidence paths: ___
Production decision owner/window: ___
Rollback and backup reference: ___

## Boundaries

- Choose a host for each stage and verify its tool mapping. Pass evidence explicitly between stages; the listed resources do not automatically configure or invoke one another.

- Use a restricted database role and verify the server’s access mode. A catalogue pairing does not make unrestricted SQL safe.

- EXPLAIN ANALYZE executes the query. Index creation, schema changes and production execution require a separate authorised step.

Workflow: https://undominated.ai/workflows/#investigate-a-postgres-query

Original worksheet: MIT. Linked resources retain their own licences and setup requirements.
