Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the use of relational database storage affect the performance of a graph database? #2138

Open
daodol opened this issue Dec 3, 2024 · 1 comment
Labels
question Further information is requested

Comments

@daodol
Copy link

daodol commented Dec 3, 2024

Shouldn't the essence of a graph database be to solve the SQL performance problems of relational databases and the storage problems of relational databases? This graph database engine is still using SQL queries and using PostgreSQL storage. In doing so, is it just what a graph database looks like? Not actually optimized for relational databases?

@daodol daodol added the question Further information is requested label Dec 3, 2024
@BennySobol
Copy link

BennySobol commented Dec 25, 2024

In my experience, this extension works exceptionally well for queries with a well-defined path and consistent hops. It translates these queries into SQL joins efficiently, making it a reliable choice in such scenarios.

However, indexing can be a challenge and is not well-documented. The extension uses native GIN indexes for match (e.g., {} clauses), while B-tree indexes are applied to standard WHERE operand. For example, merging operations must use a GIN index, even if it seems unnecessary in many cases.

For less structured queries — such as finding all leaves of a given root — the extension shines compared to manually writing SQL joins. It performs operations directly in the database by loading edges, sorting them, and applying graph algorithms to find paths. These operations benefit significantly from in-memory processing, as disk-based operations are inherently slower. However, performance can degrade exponentially when traversing large, dense graphs. If your data involves a tree with many dense nodes and long traversal paths, performance may become a bottleneck.

Additionally, the extension supports Cypher queries, a query language optimized for graph operations. Its syntax is specifically designed for graph traversal and analysis, offering a more efficient and intuitive approach compared to traditional SQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants