Amit Lamba
Amit Lamba

Reputation: 336

Migrate Data from Neo4j to SQL

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.

Upvotes: 0

Views: 1413

Answers (2)

Michael Hunger
Michael Hunger

Reputation: 41676

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.

Upvotes: 1

Mattias Finné
Mattias Finné

Reputation: 3054

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?

Upvotes: 1

Related Questions