Roadmap
QueryPilot is developed in phases. This page separates what exists in the code today from what is planned. Items marked Roadmap in these docs refer to the sections below. Nothing on this page is a delivery commitment.
- Foundation: monorepo, configuration schema with validation, Docker Compose deployment,
automatic migrations, health probes, Prometheus
/metricsself-metrics, OpenAPI. - Database connectivity: database registration with encrypted credentials, connection testing with capability detection and remediation.
- Agent: registration, heartbeats, token rotation and revocation, bounded buffering, idempotent delivery, centrally managed settings and on-demand tasks. Collectors for query statistics, activity (including wait events), locks, connections, table and index statistics, and plans.
- Workload intelligence: query fingerprinting and normalization, statement classification, a windowed query explorer, per-query history with estimated percentiles, and the database overview.
- Execution plans: automatic generic-plan capture on PostgreSQL 16+, on-demand capture, EXPLAIN JSON upload, plan sanitization, structural plan fingerprints, annotated plan trees and semantic plan comparison.
- Analysis engine: a per-database analysis job every minute, running 16 deterministic rules with tunable thresholds: query regression, sequential scans, row-estimate mismatch, expensive sorts, nested loops, I/O-heavy queries, N+1 queries, lock contention, long and idle-in-transaction sessions, connection saturation, table bloat, stale statistics, transaction ID wraparound, and unused, duplicate and invalid indexes. See Findings.
- Findings: severity, evidence, confidence, deduplication, a status workflow (open, acknowledged, resolved, ignored) and automatic reopening when a resolved problem returns.
- Recommendations:
CREATE INDEX CONCURRENTLY,ANALYZE,VACUUM, autovacuum settings,DROP INDEX CONCURRENTLYand N+1 batching rewrites, each with a SQL preview, risk level and safety notes. Operators run the SQL themselves. - Validation: after a recommendation is marked applied, before and after windows are compared with Welch’s t-test and a p95 consistency check, and the result is reported as improved, no change, regressed or inconclusive.
- Locks & waits: sampled wait events attributed to queries, blocking chains, and the queries that wait, block and get blocked.
- Tables & indexes: dead rows against each table’s effective autovacuum threshold, analyze lag, freeze age, index usage, and size and dead-row history.
- Organization: environments (production, staging, development, testing) and tags for databases, with filters and grouping.
- Web app: per-browser preferences for theme (light, dark or system), time zone, relative times, default time range and auto-refresh.
- Live demo: the full web app on built-in sample data, with no backend.
In progress
Section titled “In progress”- Cost attribution: agents already record load per database role and
application_name. Next is showing where load comes from: by role, by application, and each query’s share of total time.
AI and MCP
Section titled “AI and MCP”- Plain-English explanations of findings, grounded in their evidence: every statement links back to the numbers QueryPilot measured.
- An MCP server with read-only tools (
list_findings,explain_query,compare_plans,get_waits) for Claude, Cursor and other agents. - Chat over a database’s performance history.
- Providers: Ollama (local), OpenAI, Anthropic or any OpenAI-compatible endpoint. Off by default,
with privacy switches (
sendQueryText,sendDatabaseNames) that also default to off. Deterministic analysis never depends on AI. The Compose file’saiprofile already starts a local Ollama.
Alerting
Section titled “Alerting”- Alert rules by environment, severity and rule.
- Slack, email, PagerDuty and signed webhooks with SSRF protection.
- A weekly digest of regressions, validated fixes and time saved.
Observability export
Section titled “Observability export”- Prometheus metrics for the top N queries. The service self-metrics endpoint already exists.
- OpenTelemetry (OTLP) export.
- Ready-made Grafana dashboards.
The related settings (QUERYPILOT_TELEMETRY_EXPORT_ENABLED, QUERYPILOT_OTLP_*,
QUERYPILOT_WEBHOOK_*, …) are already accepted by the configuration loader.
Stop regressions in CI
Section titled “Stop regressions in CI”- A pull request check that compares plans and latency against the main branch on staging data.
- A migration safety linter for DDL that takes heavy locks or rewrites tables, such as
CREATE INDEXwithoutCONCURRENTLYor a missinglock_timeout. - Deploy markers on charts and findings, sent from CI.
Deeper diagnosis
Section titled “Deeper diagnosis”- Root-cause timelines that link related findings (stale statistics → plan change → regression → lock pile-up) into one incident.
- Time-of-day and weekday baselines, so scheduled batch jobs are not reported as regressions.
- Index what-if analysis with HypoPG, before an index is created.
- Replication lag, replication slots and WAL volume; vacuum and index-build progress.
- A configuration advisor for
work_mem,shared_buffers,random_page_costand autovacuum. - Capacity forecasts for disk, table growth and connections.
- Detection of parameter-sensitive plans.
- A health score per database.
Cost and ownership
Section titled “Cost and ownership”- Database cost by role, application and team, optionally in money from the instance price.
- Query ownership from sqlcommenter tags or
application_name, with findings routed to the owning team.
Teams and platform
Section titled “Teams and platform”- Authentication: local accounts first, then OIDC/SSO and role-based access.
- A fleet view across clusters and environments.
- A CLI with a
querypilot doctordiagnostic command. - A Terraform provider for databases, alert rules and tags.
- A retention worker that enforces
retention.*with rollups for long-term history. The settings exist, but telemetry is not purged automatically yet. - A Helm chart, and integrations with managed providers such as RDS Performance Insights and Cloud SQL.
Not planned
Section titled “Not planned”- Automatic changes to your database. QueryPilot recommends and validates; it never creates indexes, runs maintenance or writes on its own.
- Other database engines. QueryPilot is PostgreSQL only.