bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.32k stars 146 forks source link

Does agensgraph support partitioning or sharding? #572

Closed adguzun closed 1 year ago

adguzun commented 1 year ago

Hello! We considering using AgensGraph for our new project and migrate existing Postgres database into it to use graph features. Our only concern is partitioning option, some our queries will certainly be performed via fullscan due to nature of the data, so partitioning would help here a lot. Announce for AgensGraph v2.5 contains "– With partitioning, large-scale data processing is improved" but it's not clear what it means.
Can we have our graph data partitoned?

kysmou commented 1 year ago

Hello. Thank you for considering AgensGraph.

AgensGraph is a multi-DBMS that can store graph data(GDB data) as well as relational data(RDB data). Graph data can be extracted through Cypher query, and graph data and RDB data can be extracted together with Hybrid query (SQL+Cypher).

The partition function you mentioned can be fully utilized in RDB data, and graph data can be stored in a parent-child inheritance relationship.

In RDB Partition, it is possible to efficiently manage data by storing large amounts of data in the partition table. Performance can be improved by scanning only the partition during inquiry. (Pruning feature)

In graph data, it is possible to divide and store and manage data like a partition, but the above pruning function is not provided. So, it has the same performance as scanning the parent table. If necessary, a child label (table) must be specified in the query according to the data range to be searched.

However, when data modeling is carried out to utilize RDB data, performance can be improved by using a hybrid query.

For example, relationship data is stored and managed as Graph data, and log data is stored as RDB and managed by partitions. You can search together at once using Hybrid Query.

Sharding of graph data is not currently supported. However, RDB Data is testing the sharding function.

adguzun commented 1 year ago

Thanks for clarification!