Skip to main content

Performance and benchmarks

An overview of SurrealDB’s performance characteristics, benchmark data, and optimisation best practices.

Lizzie Holmes avatar
Written by Lizzie Holmes
Updated this week

Overview

Performance is a top concern for architects and engineering leaders evaluating any database for production use.

SurrealDB is designed with performance in mind - supporting real-time querying, fast indexing, and scalable throughput across diverse workloads including graph traversal, vector search, document storage, and time-series ingestion.

This article highlights SurrealDB’s core performance principles, benchmark data, and best practices for tuning your deployment for speed and scale.


Core performance strengths

Fast graph traversals

Deep relationship queries that would require joins in SQL are optimised via SurrealDB’s native graph engine.

SurrealQL performance

The SurrealQL query planner and execution engine are optimised for a hybrid of relational and document-style access patterns.

Indexed search

Full-text, numeric, and geospatial indexes can dramatically speed up query performance.

Efficient vector search

Native support for similarity search with optimised vector indexing.

Streaming writes

High-throughput ingestion pipelines are supported via batch insert operations and client-driven streaming.


Scalability model

Embedded → distributed

Run SurrealDB embedded (single binary), then scale to distributed clusters without rewriting your application.

Query concurrency

Supports high concurrency with built-in ACID transaction isolation and lockless reads.

Write performance

Internally powered by RocksDB, tuned for write-heavy use cases such as IoT or logging.


Benchmarking

Interested in benchmarking SurrealDB or understanding how we test performance? Here are some resources to get you started:


Performance best practices

  1. Model your data and schema carefully
    Use SurrealDB’s flexible modeling to simplify complex joins and leverage graph relationships efficiently. Design your schema to match your most common query patterns.

  2. Use indexes strategically
    Apply full-text, numeric, and geospatial indexes where needed to improve query performance on large datasets. Avoid over-indexing frequently updated fields.

  3. Tune queries for efficiency
    Use LIMIT to avoid unbounded result sets. Write SurrealQL queries that align with your data model - whether document-based, graph-based, or vector-based.

  4. Monitor performance actively
    Use SurrealDB’s metrics endpoints and query logs to track slow queries, identify hotspots, and optimise query performance.

  5. Benchmark and iterate
    Test your workload under realistic conditions before deploying to production. Profile key query paths and adjust schema, indexing, or query structure as needed.


Learn more

Did this answer your question?