A billion rows on disk · the top 10 rows by price
11 ms
Vectro
827 ms
DuckDB 2.0
Every block of rows keeps its smallest and largest values, so Vectro skips the blocks that can't hold a winning row. Level or faster on 7 of 8 queries at this size.
An analytics engine you import into your JavaScript app. Load millions of rows, then filter, group, join and run SQL on them, using every core of the machine.
What it does
Most apps send their data to a database or a warehouse to add it up, group it or search it. Vectro does that work where the data already is: in your Node server, or in your user's browser. There is no server to run and nothing native to install.
One package, no dependencies.
npm i vectrojsCSV, JSON, Arrow, plain arrays, or files bigger than memory.
engine.readCSV('orders.csv')In SQL, or in JavaScript with filter, groupBy and join.
sql('SELECT …', { orders })Your code
import { Engine, sql } from 'vectrojs';
const engine = new Engine(); // uses every core
const orders = engine.table({
region: ['EU', 'US', 'EU', 'APAC', 'US', 'EU'],
price: [120, 80, 45, 300, 99, 15],
qty: [2, 1, 4, 1, 3, 10],
});
sql(`SELECT region, COUNT(*) AS orders, SUM(price * qty) AS revenue
FROM orders GROUP BY region ORDER BY revenue DESC`, { orders }).toRows();What you get back
| region | orders | revenue |
|---|---|---|
| EU | 3 | 570 |
| US | 2 | 377 |
| APAC | 1 | 300 |
Rows as plain objects. The same code runs on six rows or sixty million.
Why Vectro
20/20
SQL queries faster than DuckDB, the best-known embedded analytics database, on 10 million rows, with the same answers.
The benchmarks ↗0.37 GB
of memory to query a billion rows from a file on disk. DuckDB used 6.6 GB for the same file.
Bigger than memory ↗3
places it runs: Node servers, web browsers and edge runtimes like Cloudflare Workers. Pure JavaScript and WebAssembly.
In the browser ↗Running in this tab, right now
0.0ms
to group 1,000,000 rows by 100,000 customers, on your own computer.
The details
A billion rows on disk · the top 10 rows by price
11 ms
Vectro
827 ms
DuckDB 2.0
Every block of rows keeps its smallest and largest values, so Vectro skips the blocks that can't hold a winning row. Level or faster on 7 of 8 queries at this size.
Ten million orders, same SQL · ms
Vectro DuckDB
BI tools
Serve tables over the PostgreSQL protocol and open them in Power BI, Tableau, Metabase or Grafana.
How ↗Streams and vectors
Live windows over a stream of rows, and nearest-neighbour search over embeddings, on every core.
Streams ↗AI assistants
An MCP server lets Claude and other assistants load your files and answer questions about them with SQL.
Set it up ↗