---
title: "SurrealDB vs. Postgres | Database comparison"
description: "A comparison of SurrealDB and PostgreSQL features and capabilities."
url: https://surrealdb.com/comparison/postgres
---

# SurrealDB vs. Postgres

SurrealDB natively unifies relational, graph, vector, document, and temporal data in a single engine - no extensions or workarounds.

[Migrate from Postgres](https://surrealdb.com/docs/build/migrating/from-other-databases/from-postgresql) [Contact us](https://surrealdb.com/contact)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

KEY ADVANTAGES

## Why teams choose SurrealDB over Postgres

Postgres supports parts of this through extensions and workarounds. SurrealDB runs all of it natively in one system.

### Vector + graph retrieval

Vectors identify similar items. Graphs add relationship context during retrieval.

### Higher accuracy through context

Graph-based retrieval improves relevance by incorporating relationship-aware reasoning.

### Lower cost at scale

A single unified engine eliminates the need for multiple specialised systems, reducing infrastructure sprawl.

### Operational simplicity

One engine replaces kNN, multi-store SQL pipelines, and distributed instance coordination.

HOW IT COMPARES

## SurrealDB vs. Postgres + pgvector

Postgres is a powerful relational database, but AI and retrieval workloads stretch it beyond its original design. SurrealDB handles these workloads natively.

Feature

PostgreSQL

SurrealDB

Architecture

Monolithic relational engine. Extensions bolt additional capabilities onto a core not designed for multi-model execution.

Distributed, multi-model database with a decoupled query and storage layer. Efficient as single node or distributed.

Models

Relational database with JSON, full-text search, and vector support via extensions. No native graph model.

Native multi-model: document, relational, graph, key-value, time-series, vector, full-text search, and geospatial.

Relationship querying

Relationships expressed through foreign keys and joins. Cost increases with join depth.

First-class relationships traversed directly without joins. No join planning or join indexes required.

Scale

Scaling beyond a single node requires manual primary/replica coordination. Large deployments commonly require manual sharding.

Horizontally scalable for both reads and writes. Designed to eliminate the need for sharding.

Schema evolution

Schema changes on large tables are disruptive and risky. Migrations often require maintenance windows.

Schema-flexible by design. Start schemaless and incrementally enforce schema without downtime.

Pricing

Infrastructure costs grow with index count, replicas, and sharding.

Unified engine reduces the need for multiple specialised systems. Costs scale linearly with usage.

FEATURED BLOG

## Learn more about SurrealDB vs. PostgreSQL

A detailed look at how SurrealDB compares to PostgreSQL for modern application and AI workloads.

![A look at SurrealQL and how it differs from PostgreSQL](https://cdn.surrealdb.com/d5rql5c8bm2s73cj5k7g.auto)

Jan 27, 2026

Tutorial

### [A look at SurrealQL and how it differs from PostgreSQL](https://surrealdb.com/blog/a-look-at-surrealql-and-how-it-differs-from-postgresql)

TRUSTED BY

## Enterprise teams building on SurrealDB

From knowledge graphs to AI assistants - how enterprise teams are building on SurrealDB.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg) DATABASE

### [Unlocking insights with knowledge graphs](https://surrealdb.com/customer/samsung)

Samsung Ads uses SurrealDB to build dynamic, real-time knowledge graphs for smarter campaign execution - collapsing three legacy data stores into one.

Read case study

![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg) DATABASE

### [AI assistant empowering 10,000 technicians](https://surrealdb.com/customer/verizon)

Verizon uses SurrealDB to power a generative AI assistant for 10,000 field technicians, delivering instant access to documentation, outage updates, and workflows.

Read case study

![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg) DATABASE

### [Unified infrastructure monitoring](https://surrealdb.com/customer/tencent)

Tencent consolidated nine backend tools into one real-time monitoring platform powered by SurrealDB's multi-model context graph.

Read case study

![PolyAI](https://surrealdb.com/assets/static/c5fa07c66cd05131.BnC7wHcc.svg) DATABASE

### [High-performance customer service AI powered by RAG](https://surrealdb.com/customer/polyai)

PolyAI connects SurrealDB to Agent Studio for low-latency, customer-controlled RAG across voice AI experiences.

Read case study

![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue-white.pDJ9HGmf.svg) DATABASE

### [AI-powered personalisation at massive scale](https://surrealdb.com/customer/saks)

Saks Fifth Avenue uses SurrealDB's vector search and graph capabilities to deliver real-time, AI-powered personalisation across 5 million luxury customers and 45 million monthly product-recommendation queries.

Read case study

FREQUENTLY ASKED QUESTIONS

## Common questions about Postgres

How is SurrealDB different from PostgreSQL?

Can SurrealDB replace PostgreSQL?

How does SurrealDB handle relationships compared to PostgreSQL joins?

GET STARTED

## Migrate from Postgres

Relational depth without the extension sprawl: documents, graphs, and vectors in one ACID engine.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Migration guide](https://surrealdb.com/docs/build/migrating/from-other-databases/from-postgresql)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Postgres","item":"https://surrealdb.com/comparison/postgres"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How is SurrealDB different from PostgreSQL?","acceptedAnswer":{"@type":"Answer","text":"PostgreSQL is a relational database that supports additional capabilities through extensions. SurrealDB natively unifies relational, document, graph, vector, full-text, and temporal data models in a single engine with a single query language."}},{"@type":"Question","name":"Can SurrealDB replace PostgreSQL?","acceptedAnswer":{"@type":"Answer","text":"Yes, for many workloads. SurrealDB supports relational-style queries, ACID transactions, and schema enforcement while also providing native graph, vector, and full-text capabilities that PostgreSQL requires extensions for. A migration guide is available in the documentation."}},{"@type":"Question","name":"How does SurrealDB handle relationships compared to PostgreSQL joins?","acceptedAnswer":{"@type":"Answer","text":"PostgreSQL expresses relationships through foreign keys and joins, where query cost increases with join depth. SurrealDB treats relationships as first-class citizens that are traversed directly using graph operators, eliminating join planning overhead."}}]}
```
