Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-21-2020 04:27 AM
Im using neo4j spring data for save node,by using saveall method based on org.springframework.data.neo4j.repository.Neo4jRepository
Im trying to work with batch of 2000 entity per each saveall operation ,for the firsts operations it take aroung to 10 second - and be come more slower - the worst case is 10 min for 2000 entities when in neo4j found 200,000 nodes without any relation
Tnx in advance
11-23-2020 02:34 AM
Could you please tell me which version of Spring Data Neo4j you are running?
11-24-2020 03:09 AM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-neo4j -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
09-15-2021 07:25 PM
I expect that you might have a single Node entity class in your Spring Boot solution and that your are using dynamic labels (@Labels())
I expect that saveall uses a merge for each node that it creates. Creating an index on id will solve your performance problemen. Performance now decreases each time that you call saveall, (Also see @Properties(prefix="node",delimeter="_", allowCast=true for creating a dynamic properties collection)
Node is here the Node entity class. (Issue that i see in Neo4j browser is that is shows total count for Node (my entity class) and the totals for each dynamic label,
CREATE INDEX ON :Node(id)
Creating the index solved the performance issue for me. Saving 5300 Nodes and about 3000 Edges now each time in < 2s. Without the index 10s increasing after each saveall 20s, 35s, ......
All the sessions of the conference are now available online