Skip to content

Home

The AI-Native
Bitemporal Database

Append-only immutable storage with MVCC snapshot reads, full SQL, LSM-tree engine, and embedded AI runtime. Built in Rust.

276ns Point Reads
1.9µs Point Writes
4× Faster reads vs SQLite
20× Faster writes vs SQLite

Why TensorDB?

Every write is an immutable fact. Every fact has a timeline. No data is ever lost, overwritten, or silently mutated.

Performance

TensorDB sled redb SQLite
Point Read Latency (lower is better)
TensorDB
276ns
sled
244ns
redb
573ns
SQLite
1.1µs
Point Write Latency (lower is better)
TensorDB
1.9µs
sled
9.2µs
redb
18.4µs
SQLite
38.6µs
Prefix Scan (100 keys, lower is better)
TensorDB
45µs
sled
38µs
redb
89µs
SQLite
156µs
Mixed Workload (80% read, 20% write)
TensorDB
2.1µs
sled
4.8µs
redb
7.2µs
SQLite
12.4µs

Benchmarks run on Linux x86_64, single-threaded, 1M pre-loaded keys. Lower is better for all measurements. See full benchmarks.

Try TensorDB SQL

TensorDB SQL
SELECT name, email, created_at
FROM users
WHERE status = 'active'
ORDER BY created_at DESC
LIMIT 5;
Results 5 rows
nameemailcreated_at
Alice Chenalice@example.com2025-03-15 09:22:01
Bob Smithbob@example.com2025-03-14 14:05:33
Carol Wucarol@example.com2025-03-14 08:47:19
Dave Parkdave@example.com2025-03-13 22:11:45
Eve Joneseve@example.com2025-03-12 16:33:08
INSERT INTO transactions (id, account, amount, currency)
VALUES ('txn_001', 'acc_alice', 250.00, 'USD');

-- Every write becomes an immutable fact with:
--   commit_ts  = auto-assigned system timestamp
--   valid_from = now (or specified)
--   valid_to   = infinity
Results 1 row
result
1 row inserted (commit_ts: 1042)
-- Read the database as it was at commit 500
SELECT account, balance
FROM accounts
AS OF 500
WHERE account = 'acc_alice';
Results 1 row
accountbalance
acc_alice1,500.00
-- What was the policy rate valid on 2024-06-15?
SELECT policy_id, rate, valid_from, valid_to
FROM insurance_policies
VALID AT 1718409600
WHERE policy_id = 'POL-2024-001';
Results 1 row
policy_idratevalid_fromvalid_to
POL-2024-0014.2517040672001735689600
SELECT u.name, COUNT(o.id) as order_count,
       SUM(o.total) as total_spent
FROM users u
JOIN orders o ON u.id = o.user_id
GROUP BY u.name
HAVING total_spent > 100
ORDER BY total_spent DESC;
Results 3 rows
nameorder_counttotal_spent
Alice Chen122,450.00
Bob Smith81,823.50
Carol Wu5967.25
EXPLAIN ANALYZE
SELECT * FROM orders
WHERE user_id = 'u_alice'
  AND status = 'shipped';
Results 7 rows
plan
Filter { predicate: status = 'shipped' }
└─ PointLookup { key: 'u_alice', cost: 1.00 }
execution_time_us: 42
rows_returned: 3
bloom_filter_hits: 1
cache_hits: 2

Get Started

Terminal window
cargo add tensordb

License: TensorDB is available under the PolyForm Noncommercial License 1.0.0. Free for personal, educational, and research use. Contact us for commercial licensing.