Migrate Data from Neo4j to SQL

流过昼夜 提交于 2019-12-12 04:13:15

问题


Hi I am using neo4j in my application and my structure is as following:

  1. I am using Embedded Graph API
  2. I have several databases that I point to using a pool that I maintain in my application eg-> db1, db2, db3, ..... db100
  3. When I want to access a particular database I point to it using new EmbeddedGraphDatabase("Path to db(n)")
  4. The problem is that when the connection pool count increases the RAM size being consumed by the application keep increasing and breaks down the application at a point of limit.
  5. So I am Thinking of migrating from Neo4j to some other Database.
  6. Additionally only a small part of my database is utilizing the graph structure.

One way for migration is that I write a script for it. Is there any better option?

My another question is what is the best Database so that my structure can be maintained.

Other view-point that I am thinking about is I can keep part of my data into Neo4j and shift another part to some other database.

If anything is unclear I can clarify.

Thanks in advance.


回答1:


An EmbeddedGraphDatabase instance is not the equivalent of a "connection" in SQL. It's designed to run a long time (days, months). Hence starting/stopping is costly.

What is the use case for having hundreds of separate databases in the same JVM?




回答2:


Your lots of small databases will perform poorly as the graphdb is designed to hold the whole datamodel on a single host.

Do you run a single JVM per database?

You can control the amount of memory used by neo4j by providing the correct properties for memory mapping and also use the gcr cache from neo4j-enterprise and control the cache size-property variables.

I think it still makes sense to keep the graph part in Neo4j and only move the non-graphy part.



来源:https://stackoverflow.com/questions/12673331/migrate-data-from-neo4j-to-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!