# Execution-verified PostgreSQL optimizer for recurring analytical queries

> Project brief for Claude Code from NixInc Ideas: https://nixinc.co/ideas/2026-09-17-execution-verified-postgresql-optimizer-for-recurring
> Scored 6.7/10 on 17 Sept 2026, verdict WATCH. Prices are as of the dates shown.

## What we're building
Teams running expensive, repeated, join-heavy PostgreSQL queries want faster plans, but a fix tested on one benchmark can break with stale statistics, planning cost or different data shapes.

## Who pays
Platform engineering or database lead at a SaaS or data company, often reached through PostgreSQL consultancies.

## What they already pay
- pganalyze, One server: $149/mo (as of 17 Sept 2026)
- pganalyze, Four servers: $399/mo (as of 17 Sept 2026)

## Milestone 0: the 72-hour test, before any code
Send a one-page concierge offer and reproducible benchmark protocol to 40 qualified PostgreSQL platform leads/consultancies.

- Pass line: At least 4 qualified replies, 2 sanitized recurring workloads, and 1 buyer accepting a paid pilot.
- Stop rule: Kill if fewer than 2 workloads are supplied or nobody accepts paid validation; do not build an autonomous planner first.

Do not start milestone 1 until the pass line is met.

## Milestone 1: the smallest version worth shipping
A concierge benchmark: take one sanitized recurring workload, replay it under several parameter and data-shape cases, propose reversible plan hints, and report p95 changes with a rollback for each hint.

## Skip in v1
An autonomous planner, a generic LLM query optimizer, and the query and index advisors pganalyze already sells.

## Needs
Sanitized customer workloads and statistics, a PostgreSQL test environment that can replay them, a way to apply and remove plan hints, and contacts among PostgreSQL consultancies and platform leads.

## How to work in this repo
1. Plan before you edit: say which files change, the smallest change that works and how you will check it, then wait for a yes.
2. One task at a time, small enough to read in one diff.
3. After each change, run the checks, then say what changed, what you tested and what still needs a person to look at.
4. Check it like a first-time customer: run the real thing and try the empty, error and success paths.
5. Keep secrets out of the repo and out of chat. Environment files stay local.
6. Ask before installing dependencies, touching payments or sign-in, or deleting files.
7. Do not build anything listed under "Skip in v1".
