Local-first SQL performance optimizer

Find & fix slow SQL
before it reaches production.

dbopt reads your T-SQL, your execution plans, and your live server metrics — then tells you exactly what's going to hurt and how to fix it, with the reasoning cited. Statically. Privately. No execution, no locks, no load on prod.

ANALYZER READY
RULES 102
SCENARIOS 145
F1 1.000
Three lenses · one tool

Most tools watch one angle. dbopt watches three.

Static code, the optimizer's plan, and the live instance — fused into a single verdict you can act on.

01 / STATIC · MATURE

Shift-left analysis

A token-level T-SQL analyzer — 102 rules across hygiene, sargability, deprecated syntax, plan-shape, locking, tempdb, transactions, security and index design. Runs in-browser via WebAssembly or as a CLI. No connection required.

02 / PLAN · MATURE

Execution-plan breakdown

Fetches the estimated plan (compile-only — never runs the query) and breaks down operator cost, scans vs. seeks, and spill risk. We've dissected multi-hour queries without executing them once.

03 / LIVE · ON-DEMAND TRIAGE

Live Pulse & Triage

Watch real-time vitals (CPU load, throughput, contention, waits) on demand, and run a lightweight poller that samples Query Store, deadlocks and index usage into a local time-series for an on-demand pain report (e.g. the last 7 days) whenever you want one. This is on-demand triage you start and read yourself — not a hands-off APM with paging or alerting.

REWRITE · sargability.function_on_column
-- ✗ non-sargable: index on OrderDate can't be used
SELECT * FROM Orders
WHERE YEAR(OrderDate) = 2025;

-- ✓ dbopt rewrite: range predicate stays sargable
SELECT * FROM Orders
WHERE OrderDate >= '20250101'
  AND OrderDate < '20260101';
-- ↳ wrapping the column in YEAR() forces a scan;
--   a half-open range lets the optimizer seek.
Prescriptive & cited

Not "here's a finding."
Here's the fix — and why.

The concrete rewrite

Every rule ships a copy-paste fix, not just a warning — plus a one-click "send to the analyze editor."

The engine-level reasoning

Each finding cites the why — what the optimizer does, and how the rewrite changes the plan.

Version-aware (2019 → 2025)

A 2022+ rewrite is never suggested against a 2019 target. Defaults to SQL Server 2025.

Grounded AI assistant

The assistant gets your SQL and the findings as context. Run it fully local (Ollama / web-llm) — nothing leaves — or fan one prompt out to several cloud providers to compare.

Local-first by design

Your data stays on the box — until you say otherwise.

A single Rust binary, SQLite for storage. The analyzer never phones home. The AI assistant runs on a local model (Ollama / web-llm) so nothing leaves — or a cloud model if you want one, sending only your prompt. Built for pharma, finance and healthcare — shops that can't ship their data anywhere by accident.

Nothing phones home

No telemetry, no account, no analytics — ever. The only data that leaves is a prompt you deliberately hand to a cloud AI model.

One static binary

Linux, macOS, Windows. No runtime, no external services, web UI embedded inside.

Read-only & safe

Estimated plans compile-only. DDL is preview-only — Safe-Apply never auto-runs a change.

Free & open

No per-seat cost, no paywalled features — what the commercial tools do, without monetizing your pain.

Quality bar · proven, not promised

Held to a measurable accuracy target.

A tagged scenario corpus proves every rule fires when it should — and stays silent when it shouldn't. Run cargo run -p eval -- --html and read the live board.

0
Analyzer rules
0
Eval scenarios
0.000
Precision · Recall · F1
$0
Per-seat cost
Built for one engine, done deeply

The deepest SQL Server static optimizer.

SQL Server is the only supported engine today — 100% of the rules are SQL-Server-specific. An Engine seam exists in the code, so Postgres and MySQL are exploratory directions, not committed releases or dates.

dbopt SQL Server · supported
dbopt PostgreSQL · exploratory
dbopt MySQL · exploratory
Ready when you are

Stop guessing.
Start seeing.

one self-contained binary · run it, open 127.0.0.1:3690  ·  all releases  ·  build from source ↗

builds aren't code-signed yet — on first run, Windows: More info → Run anyway; macOS: right-click → Open. details ↗