Live data from Hacker News

Show HN: Simple-graph – a graph database in SQLite

github.com

11–20 of 44 posts

Re: Show HN: Simple-graph – a graph database in SQLite

#11

How does this perform compared to a “native” graph database like Neo4J?

It depends on how the graph is stored in the database. In this project the nodes ids are TEXT so it will likely not scale very well. I know because I use a similar implementation with GUID as string in Sqlite in a project since a couple of years and while it works fine for the graph I have (<1 million nodes, few edges per nodes) it won’t perform too well past that.

Re: Show HN: Simple-graph – a graph database in SQLite

#13

How does this perform compared to a “native” graph database like Neo4J?

It really depends on what you want to do with it.

I would benchmark the tasks "traversal", "aggregation" and "shortest past" for a 10k to 10M node graph. Anything under 10k would be good enough with most techs and over 10M need to consider more tasks (writes, backup, the precise fields queried can become their particular problems at larger scale).

The Github link implements "traversal "in Python instead of pure SQLite. I suspect it will be around x10 slower than it could be with the same tech stack, because it queries once per node from Python to SQLite. Shortest path is not implemented and would be too slow to be useful in an interactive environment. "Aggregation" is also not implemented, but it would perform admirably, because SQL is good at that.

Traditional relational OLTP databases such as Postgres are already faster than dedicated graph databases for certain graph related tasks, according to this benchmark: https://www.arangodb.com/2018/02/nosql-performance-benchmark...

Re: Show HN: Simple-graph – a graph database in SQLite

#15

How does this perform compared to a “native” graph database like Neo4J?

It depends on how the graph is stored in the database. In this project the nodes ids are TEXT so it will likely not scale very well. I know because I use a similar implementation with GUID as string in Sqlite in a project since a couple of years and while it works fine for the graph I have (<1 million nodes, few edges per nodes) it won’t perform too well past that.

Thanks for the info. Do you happen to have some stats to share?

Re: Show HN: Simple-graph – a graph database in SQLite

#16
post #9

How does this perform compared to a “native” graph database like Neo4J?

Neo4j has failed queries I have written, with "out of memory" errors. I have never, ever, ever gotten that from SQLite.

Performance issues are a very valid discussion. But to me, the availability of a graph-oriented query language on top of this graph variant of SQLite is, imho, the very first step to investigate. (RDF import/CSV import being next)

Re: Show HN: Simple-graph – a graph database in SQLite

#18
post #17

I wonder if there are ways, in SQLite, to build indices for s,p,o/s,p/p,o/ and maybe more subtle ones... That would be uber nice, given the fact that most graph databases have their own indexing strategies, and you cannot craft your own.

I saw this lecture some time back on the topic of implementation and tradeoffs https://www.youtube.com/watch?v=Dxwo9DYWV_c

Re: Show HN: Simple-graph – a graph database in SQLite

#19

How does this perform compared to a “native” graph database like Neo4J?

It really depends on what you want to do with it. I would benchmark the tasks "traversal", "aggregation" and "shortest past" for a 10k to 10M node graph. Anything under 10k would be good enough with most techs and over 10M need to consider more tasks (writes, backup, the precise fields queried can become their particular problems at larger scale). The Github link implements "traversal "in Python instead of pure SQLit…

> "shortest past"

shortest path typo, right?

Re: Show HN: Simple-graph – a graph database in SQLite

#20

Earlier quoted context omitted.

It really depends on what you want to do with it. I would benchmark the tasks "traversal", "aggregation" and "shortest past" for a 10k to 10M node graph. Anything under 10k would be good enough with most techs and over 10M need to consider more tasks (writes, backup, the precise fields queried can become their particular problems at larger scale). The Github link implements "traversal "in Python instead of pure SQLit…

> "shortest past" shortest path typo, right?

The Open Shortest Past First protocol is used to resolve temporal paradoxes.
Post reply on HN