What is the best database to store large and growing graphs?

298 Views Asked by At

I have a PostgreSQL table of users and followers named relations with the size of 200 million rows and it's growing at the rate of 10 million new users and new relations between them a week. I have set an index on the columns and I need every pair of user and follower to be unique. The maximum number of follower for a user is 5000, and the user queries are for both directions like:
on users SELECT users, followers FROM relations WHERE users NOT IN (1,2,3);
on followers SELECT users, followers FROM relations WHERE followers NOT IN (1,2,3);
time: A simple query like SELECT COUNT(*) FROM relations; would take 10 seconds in my system and I need to wait for half an hour to execute previously mentioned queries.

What is the best database to store this graph (high write rate and high read rate)

1

There are 1 best solutions below

0
On

InfiniteGraph will certainly handle the data volume and growth rate and there is a free version for databases under 50 gigabytes. We regularly test its ability to ingest billions of nodes and edges per hour. Those test are run on a multi-node cloud architecture so the performance on your hardware may vary.

InfiniteGraph supports indexes.

The InfiniteGraph query language is "DO" and your queries will look something like:

MATCH path = (u:User)-[:Relation]->(f:Follower) RETURN u, f;

and

FROM Relation return COUNT(*);

Disclaimer: I am the Director of Field Operations for Objectivity, maker of InfiniteGraph.