Turingdb
TuringDB high performance in-memory column-oriented graph database engine
Install / Use
/learn @turing-db/TuringdbREADME
A Blazingly Fast Column-Oriented Graph Database Engine
Website • Documentation • Discord • Examples
<p align="center"> <img src="https://github.com/turing-db/turingdb/blob/finalreadmefixes/img/newbackgroundgif.gif"/> </p>What is TuringDB?
TuringDB is a high-performance in-memory column-oriented graph database engine designed for analytical and read-intensive workloads. Built from scratch in C++.
TuringDB delivers millisecond query latency on graphs with millions of nodes and edges. TuringDB is commonly 200x faster than Neo4j on deep multihop queries.
<p align="center"> <a href="https://www.youtube.com/watch?v=Cpz-I6aR_cw&list=RDCpz-I6aR_cw&start_radio=1"> <img src="https://github.com/turing-db/turingdb/blob/finalreadmefixes/img/newyoutubeimage.png" width="650" /> </a> </p>Visualizing a massive mesh graph with OpenGL accelerated graph visualization
Why TuringDB?
TuringDB was created to solve real-world performance challenges in critical industries where every millisecond matters:
- Bioinformatics & Life Sciences - Analyse complex deep multi-scale biological networks
- AI & Machine Learning - Power GraphRAG, knowledge graphs, and agentic AI systems
- Real-time Analytics - Build dashboards and simulations with instant query responses
- Healthcare & Pharma - Handle sensitive data with GDPR compliance and auditability
- Financial Services - Audit trails with git-like versioning for regulatory compliance
Key Features
Performance-first Architecture
- 0.1-50ms query latency for analytical queries on 10M+ node graphs
- Column-oriented architecture with streaming query processing: nodes and edges are processed in chunks for efficiency
- In-memory graph storage with efficient memory representations
Zero-Lock Concurrency
- Reads and writes never compete - analytical queries run without locking from writes
- Massive parallelism for dashboards, AI pipelines, and batch processing
- Each transaction executes on its own immutable snapshot. Guarantees Snapshot Isolation.
The First Git-like Versioning System for Graphs
- Create and commit graph versions, maintain branches, merge changes, and time travel through history
- Perfect for reproducibility, auditability, and regulatory compliance
- Immutable snapshots ensure data integrity
Developer Friendly
- OpenCypher query language
- Python SDK with comprehensive API
Benchmarks
TuringDB delivers exceptional performance on standard graph workloads 200X faster than Neo4j:
Multi-hop Queries From a Set of Seed Nodes
Specs: Machine with AMD EPYC 7232P 8-Core CPU and RAM 64G
MATCH (n{displayName: ‘APOE-4’}) RETURN count(n)
Query for 1-hop: MATCH (n{displayName: ‘APOE-4’})-->(m) RETURN count(n)
| Query Depth | Neo4j Mean | TuringDB Mean | Speedup | |------------|-----------|---------------|---------| | 1-hop | 1390 ms | 12 ms | 115× | | 2-hop | 1420 ms | 11 ms | 129× | | 4-hop | 1568 ms | 14 ms | 112× | | 7-hop | 51,264 ms | 172 ms | 298× | | 8-hop | 98,183 ms | 476 ms | 206× |
Details: MATCH query returning node IDs from a set of 15 seed nodes with an increasing number of hops through outgoing edges.
See our detailed benchmarks for more performance data.
Quickstart
Requirements
Install via pip
- Linux: tested primarily on Ubuntu Jammy 22.04 LTS
- MacOS
For Build
TuringDB requires:
For Linux:
- Linux Ubuntu Jammy 22.04 LTS or later
- GCC version >=11
- CMake 3.10 or higher
For MacOS:
- LLVM Clang version >=15
- CMake 3.10 or higher
Install TuringDB
- Using
pip:
pip install turingdb
- Using
uv(you will need to create a project first):
uv add turingdb
and then turingdb should be in $PATH
- Using
nix:
TuringDB is available on the unstable channel on nixpkgs as turingdb for both x86 Linux and AArch macOS (Link)
- Using Docker:
Docker image (please note: other installation methods are preferred, as there is some performance loss when deploying via Docker):
docker run -it turingdbai/turingdb:nightly turingdb
How to run
Run the turingdb binary to use turingdb in interactive mode in the current terminal:
turingdb
To run turingdb in the background as a daemon:
turingdb -demon
The turingdb REST API is running in both interactive and demon mode on http://localhost:6666 by default.
Visualise the graph you have created in TuringDB
TuringDB WebGL accelerated graph visualizer allows you to visualise large graphs in the browser: TuringDB Visualizer
Example of a biological interaction graph built in TuringDB:
- Choose on the top right the graph
- Search & select a node(s) of interest (magnifying glass button on the left)
- Then go to visualiser (network logo) and you can start exploring paths, expanding neighbours, inspect nodes (parameters, hyperlinks, and texts stored on the nodes)
How to build
-
Build on Ubuntu Jammy or later
-
Clone with submodules
git clone --recursive https://github.com/turing-db/turingdb.git
./pull.sh
- Install dependencies (run only once)
./dependencies.sh
This script will automatically build or install:
- Curl and OpenSSL
- GNU Bison and Flex
- Boost
- OpenBLAS
- AWS SDK for C++
- Faiss vector search library
- Build TuringDB:
mkdir -p build && cd build
cmake ..
make -j8
make install
- Setup environment:
source setup.sh
This adds turingdb binaries to the $PATH of the current shell.
Usage Example
Create and Query a Graph
// Create nodes
CREATE (alice:Person {name: "Alice", age: 30})
CREATE (bob:Person {name: "Bob", age: 25})
CREATE (computers:Interest {name: "Computers", hasPhD: true})
// Create relationships
MATCH (a:Person {name: "Alice"}), (b:Person {name: "Bob"})
CREATE (a)-[:KNOWS {since: 2020}]->(b)
MATCH (a:Person {name: "Alice"}), (i:Interest {name: "Computers"})
CREATE (a)-[:INTERESTED_IN]->(i)
// Query the graph
MATCH (a:Person)-->(b)
WHERE a.age > 25
RETURN a.name, b.name
Python SDK
from turingdb import TuringDB
# Connect to TuringDB
db = TuringDB(host="localhost", port=XXX)
# Execute query
result = db.query("""
MATCH (p:Person)-[:INTERESTED_IN]->(i:Interest)
RETURN p.name, i.name
""")
for record in result:
print(f"{record['p.name']} is interested in {record['i.name']}")
Use cases Notebooks
A collection of notebooks demonstrating how to use TuringDB for real-world analytical examples.
Each notebook focuses on a different domain and use case, from fraud detection to biological graph exploration, leveraging the performance and versioning capabilities of TuringDB.
Explore the full set of notebooks:
github.com/turing-db/turingdb-examples
Finance & Fraud Detection
Paysim Financial Fraud Detection
Crypto Orbitaal Fraud Detection
Transport & Supply Chain
Supply Chain - ETO Chip Explorer
Healthcare & Life Sciences
Core Concepts
- Columnar Storage: Nodes and edges stored in columns for efficiency and streaming query processing. Brings modern database research ideas to graph databases.
- DataParts: Immutable data partitions that enable git-like versioning and zero locking between reads and writes
- Snapshot Isolation: Each query sees a consistent snapshot view of the graph
- Zero-locking: Read optimised architecture for high analytic workloads performance
Learn more in our [
