Company
Date Published
Author
Christophe Willemsen
Word count
1269
Language
English
Hacker News points
None

Summary

The presentation covers various tips to improve the performance of Cypher queries in Neo4j. Using official up-to-date Bolt drivers is essential, and object mappers should be avoided due to their overhead and limited suitability for batch imports. Query parameters can significantly speed up query execution by allowing caching and reuse of query plans. Reusing identifiers within queries prevents the query plan from being cached, so incremental identifiers should be used instead. Long Cypher queries should be split into smaller, more optimized queries for ease of profiling and debugging. Checking schema indexes is crucial to avoid unnecessary database hits and improve performance. Batch writes using Neo4j's `UNWIND` feature can significantly improve write performance. However, query replanning can slow down queries and introduce higher rates of garbage collection, especially in production scenarios, where disabling replanning through configuration may be necessary.