Get started

On this page

Introduction

NextSQL is a high-performance, encrypted-by-default multimodel database. Relational SQL, native JSON, vector search, full-text search, geospatial types, and nested collections share one ACID engine, one WAL, and one query optimizer.

It is a new database. It is not PostgreSQL, MySQL, MongoDB, Elasticsearch, or a vector-store compatibility layer. It has its own storage format, SQL dialect, wire protocol (NSQL v1), and official drivers.

Install the nextsql and nextsqld binaries, initialize a data directory, and start serving NSQL. Storage, WAL, MVCC, SQL, the optimizer, JSON, full-text, vectors, hybrid plans, workflows, CDC, partitioning, security, backup/PITR/export, and Raft HA are in the engine.

This site documents 0.0.5, the current release. A live install uses nextsql setup --profile production. NextSQL Admin Setup, Operations, and Studio are available on loopback. Treat the release as an engine under measurement until you have run nextsql-bench --slo and the crash/HA suites on your hardware. Hard limits and unimplemented SQL are listed under Limits.

What you can do#

A single table can hold structured columns, JSON, a vector, full-text, and a point. A single query can filter, search, and rank nearest neighbors under one physical plan:

sql
SELECT id, name, price
FROM products
WHERE metadata.category = 'headphones'
  AND price <= 15000
SEARCH description FOR 'wireless noise cancelling'
NEAREST embedding TO $query
LIMIT 20;

The write path for that row is the same WAL, MVCC, encryption, and crash recovery as a DECIMAL update.

Binaries#

BinaryRole
nextsqlCLI: init, setup, lifecycle, exec, migrate, backup, restore, verify, export, import, diagnose, status, cluster, registry, audit, token, login
nextsqldServer. Speaks NSQL v1 on --listen (default 127.0.0.1:7210)
nextsql-benchOfficial measurements. Encryption, WAL, and fsync stay on
nextsql-auth-brokerOptional OIDC token-exchange broker. nextsqld never talks to an IdP
nextsql-adminNextSQL Admin: Setup, Operations, and Studio in one loopback web UI

Non-negotiable rules#

  • Keys and passwords never go in a connection URL. Drivers reject ://, key=, and password= in the address.
  • TLS 1.3 is required for any non-loopback listen address or remote client.
  • --insecure / insecureNoTLS is loopback-only.
  • A backup or export is not valid until verify (including a restore/import test) succeeds.
  • Statements without BEGIN auto-commit. One SQL statement per exec / -c.
  • Every table needs a PRIMARY KEY. That key is the clustered B+Tree key.
  • Unquoted identifiers fold to lowercase.

Priority order#

Correctness, durability, security, integrity, availability, predictable latency, throughput, efficiency, developer experience, then extra features. Official benches keep encryption, WAL, fsync, checksums, MVCC, and authentication on.

How to read these docs#

  1. Install, Docker, and the quick start get a local instance running.
  2. The SQL chapters cover the dialect, each data model, workflows, and transactions.
  3. Operate covers users, CLI, migrations, TLS, backup, export, HA, Admin, and benches.
  4. Drivers speak NSQL v1 from Go, Node, Bun, PHP, Python, and Ruby.
  5. Internals document architecture, the wire protocol, and current limits.
0.0.5 · GitHub