diff --git a/antora.yml b/antora.yml index 7a1ac5e76..85861dac7 100644 --- a/antora.yml +++ b/antora.yml @@ -6,4 +6,4 @@ nav: - modules/ROOT/content-nav.adoc asciidoc: attributes: - neo4j-version: '2025.08' + neo4j-version: '2025.09' diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index cafa1bb70..33c835da7 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -28,6 +28,26 @@ For more information, see: * link:https://neo4j.com/docs/cypher-manual/25/introduction/[Cypher 25 Manual] ==== +[[cypher-deprecations-additions-removals-2025.09]] +== Neo4j 2025.09 + +=== New in Cypher 5 + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:new[] + +New operator: `LockNodes` + + +a| Introduced xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-lock-nodes[`LockNodes`] operator, sometimes used in conjunction with the `LockingMerge` operator to lock nodes. +|=== + [[cypher-deprecations-additions-removals-2025.08]] == Neo4j 2025.08 diff --git a/modules/ROOT/pages/planning-and-tuning/operators/index.adoc b/modules/ROOT/pages/planning-and-tuning/operators/index.adoc index 0cd2ebc76..6b5d0d570 100644 --- a/modules/ROOT/pages/planning-and-tuning/operators/index.adoc +++ b/modules/ROOT/pages/planning-and-tuning/operators/index.adoc @@ -345,6 +345,13 @@ Tests for the presence of a pattern predicate in queries containing multiple pat | | +| xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-lock-nodes[LockNodes] +| Sometimes used in conjunction with the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-locking-merge[`LockingMerge`] operator to lock nodes. +| +| +| label:new[Introduced in Neo4j 2025.09] + + | xref::planning-and-tuning/operators/operators-detail.adoc#query-plan-merge[Merge] | The `Merge` operator will either read or create nodes and/or relationships. | diff --git a/modules/ROOT/pages/planning-and-tuning/operators/operators-detail.adoc b/modules/ROOT/pages/planning-and-tuning/operators/operators-detail.adoc index 4547bf7e9..30e9edece 100644 --- a/modules/ROOT/pages/planning-and-tuning/operators/operators-detail.adoc +++ b/modules/ROOT/pages/planning-and-tuning/operators/operators-detail.adoc @@ -6087,6 +6087,83 @@ Total database accesses: 15, total allocated memory: 2232 ====== +[role=label--new-2025.09] +[[query-plan-lock-nodes]] +=== Lock Nodes + +The `LockNodes` operator is sometimes used in conjunction with the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-locking-merge[`LockingMerge`] operator to lock nodes. + + +.LockNodes +====== + +.Query +[source, cypher] +---- +PROFILE +MATCH (s:Person {name: 'me'}) +MERGE (s)-[:FRIENDS_WITH]->(t:Person {size: size([()-->()|1])}) +---- + +.Query Plan +[role="queryplan", subs="attributes+"] +---- +Planner COST + +Runtime PIPELINED + +Runtime version DEV + +Batch size 4 + ++----------------------------------------+----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline | ++----------------------------------------+----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| +ProduceResults | 0 | | 1 | 0 | 0 | 0 | 0/0 | 0.018 | | +| | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+ | +| +EmptyResult | 1 | | 1 | 0 | 0 | | 0/0 | 0.016 | In Pipeline 7 | +| | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| +Apply | 2 | | 1 | 0 | 0 | | 0/0 | | | +| |\ +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | +ArgumentTracker | 19 | | 1 | 0 | 0 | 240 | 0/0 | 0.000 | | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+ | +| | +LockingMerge | 3 | CREATE (t:Person {size: COUNT { MATCH (`anon_2`)-[`anon_3`]->(`anon_4`) RETURN $`autoint_1` AS ` | 1 | 1 | 3 | 400 | 0/0 | 15.340 | In Pipeline 7 | +| | | | | anon_0` }}), (s)-[anon_1:FRIENDS_WITH]->(t), LOCK(s) | | | | | | | | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | +AntiConditionalApply | 18 | | | 0 | 0 | 384 | | 0.010 | In Pipeline 6 | +| | |\ +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | | +Filter | 17 | t.size = anon_5 AND t:Person | 0 | 0 | 4 | | | | | +| | | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | | +Apply | 16 | | 1 | 2 | 0 | | | | | +| | | |\ +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | | | +RelationshipCountFromCountStore | 15 | count( ()-[]->() ) AS anon_5 | 1 | 2 | 2 | 608 | 0/0 | 0.113 | Fused in Pipeline 5 | +| | | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | | +Expand(All) | 14 | (s)-[anon_1:FRIENDS_WITH]->(t) | 1 | 2 | 3 | | | | | +| | | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | | +LockNodes | 13 | s | 1 | 1 | 0 | | | | | +| | | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | | +Argument | 12 | s | 1 | 1 | 0 | 584 | 0/0 | 1.494 | Fused in Pipeline 4 | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | +Optional | 11 | s | 0 | 1 | 0 | 528 | 0/0 | 2.057 | In Pipeline 3 | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | +Filter | 5 | t.size = anon_5 AND t:Person | 0 | 0 | 4 | | | | | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | +Apply | 6 | | 1 | 2 | 0 | | | | | +| | |\ +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | | +RelationshipCountFromCountStore | 7 | count( ()-[]->() ) AS anon_5 | 1 | 2 | 2 | 528 | 0/0 | 4.220 | Fused in Pipeline 2 | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| | +Expand(All) | 8 | (s)-[anon_1:FRIENDS_WITH]->(t) | 1 | 2 | 3 | | | | | +| | | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+ | | | +| | +Argument | 9 | s | 1 | 1 | 0 | 432 | 1/0 | 0.184 | Fused in Pipeline 1 | +| | +----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ +| +NodeIndexSeek | 10 | RANGE INDEX s:Person(name) WHERE name = $autostring_0 | 1 | 1 | 2 | 376 | 0/1 | 9.263 | In Pipeline 0 | ++----------------------------------------+----+------------------------------------------------------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ + +Total database accesses: 23, total allocated memory: 3248 +---- + +====== + [[query-plan-foreach]]