In this article, take a look at how indexes work in Nebula Graph and see core concepts to understand them.
Indexes are an indispensable function in a database system. Graph databases are no exception.
An index is actually a sorted data structure in the database management system. Different database systems adopt different sorting structures.
Popular index types include:
Each of them uses their own sorting algorithms.
A database index allows efficient data retrieval from databases. Despite of the query performance improvement, there are some disadvantages of indexes:
Taking the above into consideration, Nebula Graph now supports indexes for more efficient retrieves on properties.
This post gives a detailed introduction to the design and practice of indexes in Nebula Graph.
Below is a list of common Nebula Graph index terms we use across the post.
There are two typical ways to query data in Nebula Graph, or more generally in a graph database:
In the latter scenario, a high-performance scan is needed to fetch the edges or vertices as well as the property values.
In order to improve the query efficiency of property values, we’ve implemented indexes in Nebula Graph. By sorting the property values of edges or vertices, users can quickly locate a certain property and avoid full scan.
Here’s what we found are required for indexes to work in a graph database:
Below is a diagram of how indexes are stored in Nebula Graph. Indexes are a part of Nebula Graph’s Storage Service so we place them in the big picture of its storage architecture.
Seen from the above figure, each Storage Server can contain multiple Storage Engines, each Storage Engine can contain multiple Partitions.
Different Partitions are synchronized via Raft protocol. Each Partition contains both data and indexes. The data and indexes of the same vertex or edge will be stored in the same Partition.
In this article, take a look at data migration from JanusGraph to Nebula Graph. Speaking of graph data processing, we have had experience in using various graph databases. In the beginning, we used the stand-alone edition of AgensGraph. Later, due to its performance limitations, we switched to JanusGraph, a distributed graph database.
The deep learning and knowledge graph technologies have been developing rapidly in recent years. Find out more about graph databases.
In this article, take a look at the Nebula Graph source code and see a sample graph query. When I saw the Nebula Graph code repository for the first time, I was so shocked by its huge size that I didn’t know how to dig into the source code.
In this article, see part one of how to analyze relationships in Game of Thrones with NetworksX, Gephi, and Nebula Graph.
In this newsletter, see different material on graph databases including a key graph database technology, cutting edge research, and more!Parts of the world are still in lockdown, while others are returning to some semblance of normalcy.