Skip to content

Commit 237ceb0

Browse files
author
sqlopt
committed
docs(readme): redesign with logo, badges, and brand-matched layout
Centered logo + tagline + status badges, a three-lens table, prescriptive/ private sections, the quality bar (135 scenarios · F1 1.000), quick start, architecture, and the one-brand-every-engine roadmap. Links to dbopt.org and the docs/. Same verified facts, far cleaner presentation.
1 parent 9a65bf8 commit 237ceb0

1 file changed

Lines changed: 86 additions & 119 deletions

File tree

README.md

Lines changed: 86 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,130 @@
11
<p align="center">
2-
<img src="web/public/logo.svg" alt="dbopt" width="96" height="96" />
2+
<img src="web/public/logo.svg" width="104" height="104" alt="dbopt" />
33
</p>
44

5-
# dbopt
5+
<h1 align="center">dbopt</h1>
66

7-
**Find and fix slow SQL _before_ it reaches production — statically, privately, and prescriptively.**
7+
<p align="center">
8+
<b>Find and fix slow SQL <i>before</i> it reaches production — statically, privately, prescriptively.</b>
9+
</p>
810

9-
dbopt is a local-first database performance optimizer. It reads your T-SQL, your
10-
execution plans, and your live server metrics, then tells you exactly what's
11-
going to hurt — and how to fix it, with the reasoning cited. Nothing leaves your
12-
machine unless you choose to send it.
11+
<p align="center">
12+
<img src="https://img.shields.io/badge/license-free%20%26%20open-d4ff4e?style=flat-square&labelColor=0a0d12" alt="free & open" />
13+
<img src="https://img.shields.io/badge/SQL%20Server-2014%20%E2%86%92%202025-3c72ff?style=flat-square&labelColor=0a0d12" alt="SQL Server 2014 to 2025" />
14+
<img src="https://img.shields.io/badge/rules-59-d4ff4e?style=flat-square&labelColor=0a0d12" alt="59 rules" />
15+
<img src="https://img.shields.io/badge/eval%20F1-1.000-3ad29f?style=flat-square&labelColor=0a0d12" alt="F1 1.000" />
16+
<img src="https://img.shields.io/badge/local--first-no%20cloud-3ad29f?style=flat-square&labelColor=0a0d12" alt="local-first" />
17+
<img src="https://img.shields.io/badge/built%20with-Rust%20%2B%20React-7e879b?style=flat-square&labelColor=0a0d12" alt="Rust + React" />
18+
</p>
1319

14-
> **SQL Server is the product today** — comprehensive and fully tested.
15-
> PostgreSQL and MySQL are on the roadmap (future, not yet implemented). The
16-
> engine seam is in place so they slot in without disturbing the SQL Server core.
20+
<p align="center">
21+
<a href="https://dbopt.org"><b>dbopt.org</b></a>
22+
&nbsp;·&nbsp; <a href="docs/WHO-IS-DBOPT-FOR.md">Who it's for</a>
23+
&nbsp;·&nbsp; <a href="docs/ACCESS.md">Access &amp; permissions</a>
24+
&nbsp;·&nbsp; <a href="docs/ROADMAP-TO-COMPLETE.md">Roadmap</a>
25+
</p>
1726

18-
> **Free and open.** No per-seat cost, no paywalled features. The goal is to give
19-
> SQL developers and DBAs what the commercial tools do — without monetizing their pain.
27+
---
2028

21-
## Documentation
29+
**dbopt** reads your T-SQL, your execution plans, and your live server metrics — then tells you exactly
30+
what's going to hurt and **how to fix it, with the reasoning cited**. It analyzes statically and from the
31+
*estimated* plan, so there's **no execution, no locks, no load on production**. Nothing leaves your machine
32+
unless you explicitly choose a cloud model.
2233

23-
- **[Who is dbopt for?](docs/WHO-IS-DBOPT-FOR.md)** — what it does for SQL developers, DBAs, and platform teams (start here).
24-
- **[Access & Permissions](docs/ACCESS.md)** — exactly what database access each capability needs, with a least-privilege grant script and a per-platform matrix (self-managed / RDS / Azure).
25-
- **[Roadmap to "complete"](docs/ROADMAP-TO-COMPLETE.md)** — honest gap analysis vs the commercial field and the prioritized plan to close it.
34+
> **SQL Server is the product today** — comprehensive and fully tested. PostgreSQL and MySQL are on the
35+
> roadmap; the engine seam is already in place so they slot in without disturbing the SQL Server core.
36+
>
37+
> **Free and open.** No per-seat cost, no paywalled features — what the commercial tools do, without
38+
> monetizing your pain.
2639
2740
---
2841

29-
## Why this exists
42+
## Why it exists
3043

31-
Slow SQL is the silent tax on every data-heavy company: the query "that's been
32-
running since last night," the 2 a.m. incident, the cloud bill that keeps
33-
climbing. The usual ways to fight it are unsatisfying:
44+
Slow SQL is the silent tax on every data-heavy company: the query "that's been running since last night,"
45+
the 2 a.m. incident, the cloud bill that keeps climbing. The usual fixes disappoint —
3446

3547
- **Expensive, SQL-Server-locked enterprise suites** that cost more than the problem.
3648
- **Tools that only react _after_ a query runs** — by then the damage is done.
37-
- **Raw DMV dumps** that tell you _what_ is slow but not _why_ or _what to do_.
38-
- **Cloud SaaS** that wants you to ship your queries and schema off-box — a
39-
non-starter for pharma, finance, and healthcare.
49+
- **Raw DMV dumps** that tell you *what* is slow but not *why* or *what to do*.
50+
- **Cloud SaaS** that wants your queries and schema off-box — a non-starter for pharma, finance, healthcare.
4051

4152
dbopt takes the opposite stance on all four.
4253

43-
## What dbopt gives you
44-
45-
- **Shift-left analysis.** Catch the anti-pattern _before_ the query runs.
46-
dbopt analyzes statically and from the *estimated* plan — **no execution, no
47-
locks, no load on production.** It will happily dissect a query you'd never
48-
dare run. (We've pointed it at 100M+ row tables and optimized a multi-hour
49-
query without executing it once.)
50-
- **Prescriptive + cited fixes.** Not just "here's a finding" — the concrete
51-
rewrite *and* the engine-level reasoning behind it. 59 rules, each with a
52-
recommendation.
53-
- **Three lenses, one tool.** Static T-SQL analysis · execution-plan cost
54-
breakdown · live DMV + continuous monitoring. Most tools do one.
55-
- **Local-first and private.** A single Rust binary. SQLite for storage. An
56-
optional **local** LLM (Ollama) for AI help. Your SQL and schema never leave
57-
the box unless you explicitly pick a cloud model.
58-
- **Continuous sentinel.** A lightweight daemon polls your instance, builds a
59-
time-series, and surfaces a weekly **pain report** — top waits, regressions,
60-
unused indexes — so you catch trouble early instead of at 2 a.m.
61-
- **Grounded AI assistant.** The assistant gets your SQL *and* the static
62-
findings injected as context, so it explains and rewrites with real grounding
63-
— and you can fan the same prompt out to several models to compare.
64-
65-
## Who it's for
66-
67-
DBAs and senior backend/data engineers — especially teams **without** a
68-
dedicated performance expert, and regulated shops that **can't** send data to a
69-
cloud service.
54+
## What you get
7055

71-
---
56+
### 🔭 Three lenses, one tool
57+
58+
| | Lens | What it does |
59+
|---|------|--------------|
60+
| **01** | **Static** | A token-level T-SQL analyzer — **59 rules** across hygiene, sargability, deprecated syntax, modern rewrites, plan-shape, locking, tempdb, statistics and index design. Runs in-browser via WebAssembly or as a CLI. **No connection required.** |
61+
| **02** | **Plan** | Fetches the *estimated* plan (`SET SHOWPLAN_XML`, compile-only — never runs the query) and breaks down operator cost, scans vs. seeks, and spill risk. |
62+
| **03** | **Live** | Pulls DMVs (index usage, missing indexes, sizes) on demand, and the **sentinel** daemon polls Query Store, waits, deadlocks and index usage into a local SQLite time-series → a weekly **pain report**. |
7263

73-
## How it works
64+
### 🛠 Prescriptive &amp; cited fixes
7465

75-
dbopt looks at your workload through three complementary lenses:
66+
Not just "here's a finding" — the concrete **rewrite** *and* the engine-level **reasoning** behind it.
67+
Every rule ships a recommendation, and the grounded **AI assistant** gets your SQL *and* the findings as
68+
context (fan one prompt out to several models to compare). Everything is **version-aware (2014 → 2025)**
69+
a 2022+ rewrite is never suggested against a 2014 target.
7670

77-
1. **Static analysis** — a token-level T-SQL analyzer (59 rules across hygiene,
78-
sargability, deprecated syntax, modern rewrites, plan-shape, locking, tempdb,
79-
statistics, and index design). Runs in-browser via WebAssembly or as a native
80-
CLI. No connection required.
81-
2. **Execution-plan analysis** — fetches the *estimated* plan (`SET SHOWPLAN_XML`,
82-
compile-only) and breaks down operator cost, scans vs. seeks, and spill risk.
83-
3. **Live + continuous** — pulls DMVs (index usage, missing indexes, sizes) on
84-
demand, and the **sentinel** daemon polls Query Store, waits, deadlocks, live
85-
requests, index usage, and sizes into a local SQLite time-series.
71+
### 🔒 Local-first &amp; private
8672

87-
Everything is version-aware (SQL Server 2014 → 2025): a 2022+ rewrite is never
88-
suggested against a 2014 target.
73+
A single **Rust binary**. SQLite for storage. An optional **local** LLM (Ollama). No telemetry, no account,
74+
no upload — it'll happily dissect a query you'd never dare run. Estimated plans are compile-only and DDL is
75+
preview-only (Safe-Apply never auto-runs a change).
76+
77+
## Quality bar — proven, not promised
78+
79+
- **135 eval scenarios** · precision = recall = **F1 = 1.000** (target ≥ 0.95).
80+
- **100% positive and 100% negative coverage** — every rule has a scenario that proves it fires when it
81+
should *and* stays silent when it shouldn't.
82+
- Rust unit + HTTP integration tests and a Playwright UI suite.
83+
84+
```bash
85+
cargo run -p eval -- --html # → target/eval-report.html (the live board)
86+
```
8987

9088
## Quick start
9189

9290
```bash
93-
# Build the web UI first (it is embedded into the backend binary at compile
94-
# time). Requires Node 18+ and wasm-pack (`cargo install wasm-pack`).
91+
# Build the web UI first (it is embedded into the backend binary at compile time).
92+
# Requires Node 18+ and wasm-pack (`cargo install wasm-pack`).
9593
wasm-pack build crates/analyzer-wasm --target web --out-dir ../../web/src/wasm --release
9694
cd web && npm install && npm run build && cd ..
9795

98-
# Then build the Rust workspace (single workspace, no external services needed).
99-
# Skipping the web build above just makes the backend serve a placeholder page;
100-
# the CLI and analysis engine work regardless.
96+
# Build the Rust workspace (single workspace, no external services needed).
10197
cargo build --release
10298

10399
# 1) Analyze a script statically — no DB connection needed
104100
./target/release/sqlopt path/to/query.sql
105101

106-
# 2) Run the web observatory (serves the UI + API on :3690)
107-
./target/release/sqlopt-backend
108-
# then open http://127.0.0.1:3690
102+
# 2) Run the web observatory (UI + API on :3690)
103+
./target/release/sqlopt-backend # then open http://127.0.0.1:3690
109104

110-
# 3) Continuous monitoring (reads connection from env; SQL auth)
105+
# 3) Continuous monitoring (SQL auth via env)
111106
SQLOPT_SERVER="host,1433" SQLOPT_USER="..." SQLOPT_PASSWORD="..." \
112107
./target/release/sqlopt-sentinel run
113-
114-
# 4) The rule-quality eval, with an HTML report
115-
cargo run -p eval -- --html # → target/eval-report.html
116108
```
117109

118-
For UI development: `cd web && npm install && npm run dev` (proxies the API to
119-
the backend on :3690).
110+
For UI development: `cd web && npm install && npm run dev` (proxies the API to the backend on :3690).
120111

121112
## Authentication
122113

123-
dbopt connects to SQL Server with **SQL Server authentication** (username +
124-
password) out of the box — this is the default and needs no special build.
125-
126-
For **Windows / integrated (Kerberos) authentication**, rebuild with the
127-
`integrated-auth` feature, which links GSSAPI on Linux:
114+
SQL Server authentication (username + password) works out of the box. For **Windows / integrated
115+
(Kerberos) auth**, rebuild with the `integrated-auth` feature (links GSSAPI on Linux):
128116

129117
```bash
130118
cargo build --release -p backend --features integrated-auth
131119
cargo build --release -p sentinel --features integrated-auth
132120
```
133121

134-
It is off by default because the GSSAPI/Kerberos system libraries it links are
135-
not present on every build host (and are not used on Windows targets). When the
136-
feature is enabled and you connect without a username/password, dbopt uses the
137-
current Windows identity; otherwise SQL authentication is used.
122+
It's off by default because those system libraries aren't on every build host (and aren't used on Windows
123+
targets). With the feature on and no username/password supplied, dbopt uses the current Windows identity.
138124

139125
## Architecture
140126

141-
A Rust workspace plus a React/Vite/TypeScript front end:
127+
A Rust workspace plus a React / Vite / TypeScript front end:
142128

143129
| Crate | Role |
144130
|---|---|
@@ -147,42 +133,23 @@ A Rust workspace plus a React/Vite/TypeScript front end:
147133
| `analyzer-cli` | `sqlopt` — analyze a `.sql` / `.sqlplan` / bundle from the shell |
148134
| `backend` | `sqlopt-backend` — axum API + embedded web UI, LLM proxy, durable logs |
149135
| `sentinel` | `sqlopt-sentinel` — continuous DMV poller → SQLite → pain report |
150-
| `eval` | the rule-quality harness (precision/recall/F1 + HTML report) |
136+
| `eval` | the rule-quality harness (precision / recall / F1 + HTML report) |
151137
| `web/` | the "observatory" UI (analysis, plans, charts, AI, monitoring) |
152138

153-
Storage and config live under `~/.sqlopt/` (override with `SQLOPT_DATA_DIR`).
154-
No external services are required to run dbopt.
155-
156-
## Quality bar
157-
158-
dbopt holds itself to a measurable accuracy target and proves it:
139+
Storage and config live under `~/.sqlopt/` (override with `SQLOPT_DATA_DIR`). No external services required.
159140

160-
- **135 eval scenarios**, precision = recall = **F1 = 1.000** (target ≥ 0.95).
161-
- **100% positive and 100% negative rule coverage** — every rule has a scenario
162-
that proves it fires when it should *and* stays silent when it shouldn't.
163-
- Rust unit + HTTP integration tests and a Playwright UI suite —
164-
`cargo test --workspace` and `npm run test:e2e` both green.
141+
## Roadmap — one brand, every engine
165142

166-
Run `cargo run -p eval -- --html` and open the report to see the live board.
143+
**SQL Server (2014 → 2025) is the product** — complete and tested: static analysis, estimated-plan
144+
analysis, live DMVs, continuous sentinel, AI assistant, web UI.
167145

168-
## Status & roadmap
169-
170-
**SQL Server (2014 → 2025) — the product. Complete and tested.** Static analysis,
171-
estimated-plan analysis, live DMVs, continuous sentinel, AI assistant, web UI.
172-
This is where the focus is and where it stays sharp.
173-
174-
**Future (roadmap, not yet started) — multi-engine.** PostgreSQL and MySQL are a
175-
deliberate *later*. The `Engine` seam already exists (the analyzer accepts a
176-
target engine and filters rules), so adding them never destabilizes the SQL
177-
Server core. The abstraction that unlocks them:
178-
179-
- an `Engine` trait for connection, catalog/metric queries, plan capture, and
180-
version model (SQL Server's `sys.dm_*` / `SHOWPLAN_XML` → Postgres
181-
`pg_stat_*` / `EXPLAIN (FORMAT JSON)`, etc.);
182-
- a per-rule engine tag (many rules are universal; some are dialect-specific);
183-
- engine-parameterized API + UI.
146+
**PostgreSQL and MySQL are a deliberate _later_.** The `Engine` seam already exists (the analyzer accepts a
147+
target engine and filters rules), so adding them never destabilizes the SQL Server core — one master brand,
148+
a small per-engine flavor tag (`dbopt · SQL Server``PostgreSQL``MySQL`).
184149

185150
---
186151

187-
dbopt is local-first by design: your queries, schema, and metrics stay on your
188-
infrastructure. The web is at **dbopt.org**.
152+
<p align="center">
153+
<sub>Local-first by design — your queries, schema, and metrics stay on your infrastructure.</sub><br>
154+
<sub><a href="https://dbopt.org">dbopt.org</a></sub>
155+
</p>

0 commit comments

Comments
 (0)