Skip to content

Stop choosing. SurrealDB launch week, 12-16 October

See what's coming

SurrealDB vs.
Postgres

PostgreSQL. Relational at its core, with extensions for the rest.
SurrealDB. Relational, graph, vector, document and temporal data, natively.
One engine. Every model in the core, in a single transaction.

01 |THE DIFFERENCE

Where Postgres reaches, SurrealDB runs natively

Postgres covers much of this through extensions and joins. SurrealDB carries every model in the core, in one transaction.

02 |THE SAME QUERY

Similar documents, from one team, this quarter. Three joins and an operator in Postgres with pgvector. One statement in SurrealQL.

Postgres + pgvector

1-- pgvector: the similarity, then three joins
2SELECT d.title,
3 1 - (d.embedding <=> $1) AS score
4FROM document d
5JOIN authored a ON a.document_id = d.id
6JOIN person p ON p.id = a.person_id
7JOIN membership m ON m.person_id = p.id
8WHERE m.team_id = $2
9 AND d.published > now() - interval '90 days'
10ORDER BY d.embedding <=> $1
11LIMIT 10;

SurrealQL

1-- SurrealQL: the similarity and the path, together
2SELECT
3 title,
4 vector::similarity::cosine(embedding, $q) AS score
5FROM document
6WHERE embedding <|10|> $q
7 AND <-authored<-person->member_of->team CONTAINS $team
8 AND published > time::now() - 90d
9ORDER BY score DESC;

03 |HOW IT COMPARES

SurrealDB vs. Postgres + pgvector

AI and retrieval workloads stretch a relational engine past its design. SurrealDB handles them natively.

Data and relationships

SurrealDB

PostgreSQL

Models
NativeNative multi-model: document, relational, graph, key-value, time-series, vector, full-text search, and geospatial.
Via extensionsRelational database with JSON, full-text search, and vector support via extensions. No native graph model.
Relationship querying
TraversalFirst-class relationships traversed directly without joins. No join planning or join indexes required.
JoinsRelationships expressed through foreign keys and joins. Cost increases with join depth.
Operations
Architecture
DistributedDistributed, multi-model database with a decoupled query and storage layer. Efficient as single node or distributed.
MonolithicMonolithic relational engine. Extensions bolt additional capabilities onto a core not designed for multi-model execution.
Scale
HorizontalHorizontally scalable for both reads and writes. Designed to eliminate the need for sharding.
ShardedScaling beyond a single node requires manual primary/replica coordination. Large deployments commonly require manual sharding.
Schema evolution
FlexibleSchema-flexible by design. Start schemaless and incrementally enforce schema without downtime.
MigrationsSchema changes on large tables are disruptive and risky. Migrations often require maintenance windows.
Cost
Pricing
UsageUnified engine reduces the need for multiple specialised systems. Costs scale linearly with usage.
InfrastructureInfrastructure costs grow with index count, replicas, and sharding.

TRUSTED BY

Enterprise teams building on SurrealDB

Postgres,answered

PostgreSQL is a relational database that adds capabilities through extensions. SurrealDB unifies relational, document, graph, vector, full-text and temporal models in one engine and one query language.

THE PLATFORM

Everything an application and its agents know. Five surfaces, one engine.

IN PRODUCTION

Trusted at scale. Samsung, Nvidia, Verizon, Tencent, and Walmart run on SurrealDB.

14,000+

Developers building on SurrealDB Cloud

4M+

Developers building on SurrealDB worldwide

FROM THE TEAMS

SurrealDB gives us a foundation where we can unify semantic search, knowledge graphs, and AI-driven decision making without stitching together multiple systems. Collapsing responsibility into SurrealDB has become our default engineering posture.
Justin Foley

VP of Engineering, Later

GET STARTED

Migrate from Postgres. Documents, graphs and vectors in one ACID engine.

SurrealDB

The context and memory layer for AI agents

Database. Graphs, vectors, documents and relational data in one engine, in a single ACID transaction.
Agent Memory. Connects and retrieves context wherever your data lives, every fact carrying its source.
Cloud. Fully managed, in the cloud provider and region you choose.

Explore with AI

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom