Neo4j Review
Review Neo4j for Cypher optimization, indexes, graph modeling, APOC, GDS algorithms, and memory configuration.
Key Checks
- PROFILE for actual stats — flag ALL_NODES_SCAN, FILTER after scan, Cartesian products
- Anchor node most selective, WITH for early aggregation, OPTIONAL MATCH only when needed
- Node/property/relationship indexes, full-text for string search, composite for multi-prop
- Supernode avoidance — intermediate nodes or relationship properties for millions of edges
- Consistent relationship direction, timestamps as epoch integers not strings
- APOC: apoc.periodic.iterate for batch ops, apoc.refactor for restructuring
- GDS: gds.graph.project minimal projection, writeProperty vs mutateProperty
- Heap 8-31GB (Xms=Xmx), page cache covers working set, transaction max_size set
- LOAD CSV with PERIODIC COMMIT or IN TRANSACTIONS, MERGE for idempotent imports
- Causal cluster min 3 cores, read replicas for scaling, bookmarks for read-your-own-writes
- Authentication enabled, default password changed, RBAC, TLS, procedure allowlist
Output
Severity-sorted: CRITICAL, HIGH, MEDIUM, LOW, PASSED.
1---2name: neo4j-review3description: Review Neo4j graph models, Cypher queries, indexes, and configuration for performance4---56# Neo4j Review78Review Neo4j for Cypher optimization, indexes, graph modeling, APOC, GDS algorithms, and memory configuration.910## Key Checks11- PROFILE for actual stats — flag ALL_NODES_SCAN, FILTER after scan, Cartesian products12- Anchor node most selective, WITH for early aggregation, OPTIONAL MATCH only when needed13- Node/property/relationship indexes, full-text for string search, composite for multi-prop14- Supernode avoidance — intermediate nodes or relationship properties for millions of edges15- Consistent relationship direction, timestamps as epoch integers not strings16- APOC: apoc.periodic.iterate for batch ops, apoc.refactor for restructuring17- GDS: gds.graph.project minimal projection, writeProperty vs mutateProperty18- Heap 8-31GB (Xms=Xmx), page cache covers working set, transaction max_size set19- LOAD CSV with PERIODIC COMMIT or IN TRANSACTIONS, MERGE for idempotent imports20- Causal cluster min 3 cores, read replicas for scaling, bookmarks for read-your-own-writes21- Authentication enabled, default password changed, RBAC, TLS, procedure allowlist2223## Output24Severity-sorted: CRITICAL, HIGH, MEDIUM, LOW, PASSED.