Rust, do zero. Moderniza apps PostgreSQL, MySQL e SQLite — vetores nativos, sem servidor, sem extensão. Laptop, edge, CI, agentes. Written from scratch in Rust to modernise PostgreSQL-, MySQL- and SQLite-powered apps — native vectors, no server, no extension. Laptop, edge, CI, AI agents.
Copy-on-write: o branch nasce vazio e lê do main; só o que muda é gravado. Snapshot MVCC próprio. Copy-on-write: the branch starts empty and reads through to main; only what you change gets written. Each branch has its own MVCC snapshot.
CREATE DATABASE BRANCH agent_7 FROM main AS OF NOW; Time: 0.120 ms USE BRANCH agent_7; UPDATE orders SET total = total * 0.9 WHERE customer = 'carla'; DELETE FROM orders WHERE status = 'pending'; SELECT id, customer, total, status FROM orders ORDER BY id; 1 | ana | 120 | paid 3 | carla | 270 | paid ← só no branch USE BRANCH main; SELECT id, customer, total, status FROM orders ORDER BY id; 1 | ana | 120 | paid 2 | bruno | 80.5 | pending ← main intacto 3 | carla | 300 | paid SHOW BRANCHES; agent_7 | parent: main | Active main | | Active DROP DATABASE BRANCH agent_7; Time: 0.139 ms
Criar um branch. 1 GB ou 1 TB, o mesmo tempo — depois, o branch guarda só as suas alterações (DML).Create a branch. Same time at 1 GB or 1 TB; afterwards the branch holds only its own DML changes.
Armazenamento extra por branch — só as linhas modificadas.Extra storage per branch — modified rows only.
Na sua app. Mesma conexão, mesmo SQL. USE BRANCH e pronto.In your app. Same connection, same SQL. USE BRANCH and go.
Um branch por agente: tenta, valida, descarta ou promove. N agentes em paralelo, zero risco no main. AI agents: one branch per agent — try, validate, discard or promote. N agents in parallel, zero risk to main.
CREATE DATABASE BRANCH agent_7 FROM main AS OF NOW;Dev e teste com dados reais, em ms — sem pg_dump, sem restore. Instant clone: dev/test on real data in milliseconds — no pg_dump, no restore, no waiting.
CREATE DATABASE BRANCH dev_ana FROM main AS OF NOW;DROP e recrie a partir do main. Igual ao prod em 0,2 ms. DB refresh: DROP and re-branch from main — staging equals prod in 0.2 ms.
DROP DATABASE BRANCH staging; CREATE DATABASE BRANCH staging FROM main AS OF NOW;A e B na mesma app; USE BRANCH escolhe. Meça, promova a vencedora. A/B testing: variant A and B, same app; USE BRANCH picks. Measure, then promote the winner.
USE BRANCH pricing_b;ALTER TABLE num branch, teste a app. Deu errado? DROP. O main nem soube. Fearless migrations: run ALTER TABLE on a branch, test the app. Wrong? DROP. Main never noticed.
USE BRANCH migr_42; ALTER TABLE orders ADD COLUMN discount NUMERIC;Branch a partir de uma transação antiga: o banco como ele estava, sem restore. Time-travel: branch from an old transaction and query the database as it was — no backup restore.
CREATE DATABASE BRANCH audit FROM main AS OF TRANSACTION 1;CREATE TABLE docs (id INT PRIMARY KEY, body TEXT, embedding VECTOR(384)); CREATE INDEX docs_hnsw ON docs USING hnsw (embedding vector_cosine_ops); CREATE INDEX docs_pq ON docs USING hnsw (embedding vector_cosine_ops) WITH (quantization = 'product'); SELECT index_name, quantization, memory_bytes FROM pg_vector_index_stats(); docs_hnsw | None | 7681024 docs_pq | Product | 1073232 ← 7,2× menos RAM SELECT id, body FROM docs ORDER BY embedding <=> '[…384 dims…]' LIMIT 5; 42 | doc 42 · 1202 | doc 1202 · 3448 | doc 3448 · … Time: 3.479 ms SELECT id, body FROM docs WHERE body LIKE 'doc 4%' ORDER BY embedding <=> '[…384 dims…]' LIMIT 5; 42 | doc 42 · 40 | doc 40 · 414 | doc 414 · … Time: 12.330 ms ← filtro + KNN num só percurso
Índice PQ-HNSW vs exato — 19 k vetores, 384 dims (27,8 MB → 1,7 MB).PQ-HNSW vs exact index — 19 k vectors, 384 dims (27.8 MB → 1.7 MB).
vs 0,989 exato: −0,2 % de recall por 16× de memória.vs 0.989 exact: −0.2 % recall for 16× less memory.
Sem rebuild ao reiniciar, deletes online com reparo de vizinhos.No rebuild on restart; online deletes with neighbour repair.
Honesto: 16× / 0,987 vêm do fixture de regressão (128 e 384 dims); o 7,2× é desta sessão com 5 k vetores — cresce com o volume. Treino PQ (k-means) na criação do índice: ~46 s aqui. Honest: 16× / 0.987 come from the project's regression fixture (dims 128 and 384); the 7.2× above is this session with 5 k vectors — the ratio grows with volume. PQ training (k-means) runs at index creation: ~46 s for 5 k × 384 here.
| HeliosDB-Nano | pgvector | |
|---|---|---|
| Onde rodaWhere it runs | Binário de 32 MB, embarcado ou servidor PG-wire. Laptop, edge, CI, agente. | Extensão dentro de um servidor PostgreSQL. |
| Compressão do índiceIndex compression | Product Quantization nativa: WITH (quantization='product'). 16× menos RAM residente. | halfvec (2×), binário (32×, rerank manual). Sem PQ. |
| Recall com compressãoRecall under compression | 0,987 vs 0,989 exato — rerank em 2 estágios. | Depende do rerank manual; binário perde recall sem ele. |
| Filtro + KNNFiltered KNN | Um só percurso do grafo (12 ms na sessão acima). | Iterative scan (0.8+) ou pós-filtro com ef_search maior. |
| DeletesDeletes | Online, com reparo de vizinhos no grafo. | Tombstones até o VACUUM. |
| Ao lado dos vetoresNext to the vectors | Branching, time-travel, grafo, full-text — no mesmo binário. | O resto do Postgres (que continua ótimo). |
Mesmos operadores e sintaxe de índice — mais um botão de compressão e um banco inteiro que cabe onde o Postgres não cabe. Same operators, same index syntax — plus a compression switch and a whole database that fits where Postgres doesn't.
Um binário, sem dependências. Aponte o seu psql e crie o primeiro branch antes do café acabar. One binary, no dependencies. Point your psql at it and create your first branch before the coffee is gone.
$ cargo install heliosdb-nano
$ curl -sSf https://install.heliosdb.com | sh
$ heliosdb-nano start → psql -h localhost -p 5432
dimensigon/HDB-HeliosDB-Nano · Apache-2.0Source, issues, 18 agent skills, examples.
15 SET · 0h PT / 9h CEST
📅 lembrete no calendário + link do Product HuntCalendar reminder + Product Hunt link. Upvote in the first hours 🙏
▲ Product HuntInventx AG · GPC
Apache-2.0 · crates.io/crates/heliosdb-nano · heliosdb.com/docs/nano