|
4 | 4 |
|
5 | 5 | Understanding the roles of different operators in an execution plan can be an important step in making queries more efficient. |
6 | 6 | This page contains details and examples for each of the operators used by the Cypher planner. |
7 | | -For an overview of how the Cypher planner uses operators, see xref:planning-and-tuning/execution-plans.adoc#reading-execution-plans[ Understanding execution plans -> Reading execution plans]. |
| 7 | +For an overview of how the Cypher planner uses operators, see xref:planning-and-tuning/execution-plans.adoc#reading-execution-plans[ Understanding execution plans -> Reading execution plans]. |
8 | 8 |
|
9 | 9 | The operators are grouped into categories based on the role they fulfill in executing a Cypher query: |
10 | 10 |
|
@@ -1180,7 +1180,7 @@ Total database accesses: 1, total allocated memory: 184 |
1180 | 1180 | ====== |
1181 | 1181 |
|
1182 | 1182 | [[query-plan-directed-all-relationships-scan]] |
1183 | | -=== Directed All Relationships Scan |
| 1183 | +=== Directed All Relationships Scan |
1184 | 1184 |
|
1185 | 1185 | The `DirectedAllRelationshipsScan` operator fetches all relationships and their start and end nodes in the database. |
1186 | 1186 |
|
@@ -2588,7 +2588,7 @@ Allows Cypher to use xref:indexes/search-performance-indexes/using-indexes.adoc# |
2588 | 2588 | .Query |
2589 | 2589 | [source, cypher] |
2590 | 2590 | ---- |
2591 | | -PROFILE |
| 2591 | +PROFILE |
2592 | 2592 | WITH "Person" AS label |
2593 | 2593 | MATCH (people:$(label)) |
2594 | 2594 | RETURN people.name |
@@ -2634,7 +2634,7 @@ Allows Cypher to use xref:indexes/search-performance-indexes/using-indexes.adoc# |
2634 | 2634 | .Query |
2635 | 2635 | [source, cypher] |
2636 | 2636 | ---- |
2637 | | -PROFILE |
| 2637 | +PROFILE |
2638 | 2638 | WITH "FRIENDS_WITH" AS relType |
2639 | 2639 | MATCH ()-[r:$(relType)]->() |
2640 | 2640 | RETURN count(r) as relCount |
@@ -2680,7 +2680,7 @@ Allows Cypher to use xref:indexes/search-performance-indexes/using-indexes.adoc# |
2680 | 2680 | .Query |
2681 | 2681 | [source, cypher] |
2682 | 2682 | ---- |
2683 | | -PROFILE |
| 2683 | +PROFILE |
2684 | 2684 | WITH "FRIENDS_WITH" AS relType |
2685 | 2685 | MATCH ()-[r:$(relType)]-() |
2686 | 2686 | RETURN count(r) as relCount |
@@ -3379,23 +3379,23 @@ Runtime version {neo4j-version} |
3379 | 3379 |
|
3380 | 3380 | Batch size 128 |
3381 | 3381 |
|
3382 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
3383 | | -| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline | |
3384 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
3385 | | -| +ProduceResults | 0 | | 1 | 0 | 0 | | | | | |
3386 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
3387 | | -| +EmptyResult | 1 | | 1 | 0 | 0 | | | | | |
3388 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
3389 | | -| +Apply | 2 | | 1 | 1 | 0 | | | | | |
3390 | | -| |\ +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
3391 | | -| | +LockingMerge | 3 | CREATE (s)-[anon_0:FRIENDS_WITH]->(s), LOCK(s) | 1 | 1 | 1 | | | | | |
3392 | | -| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
3393 | | -| | +Expand(Into) | 4 | (s)-[anon_0:FRIENDS_WITH]->(s) | 0 | 0 | 10 | 904 | | | | |
3394 | | -| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
3395 | | -| | +Argument | 5 | s | 1 | 3 | 0 | 2280 | 2/0 | 0.460 | Fused in Pipeline 1 | |
3396 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
3397 | | -| +NodeIndexSeek | 6 | RANGE INDEX s:Person(name) WHERE name = $autostring_0 | 1 | 1 | 2 | 376 | 1/0 | 0.211 | In Pipeline 0 | |
3398 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
| 3382 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 3383 | +| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline | Indexes Used | |
| 3384 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 3385 | +| +ProduceResults | 0 | | 1 | 0 | 0 | 0 | | | | | |
| 3386 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 3387 | +| +EmptyResult | 1 | | 1 | 0 | 0 | | | | | | |
| 3388 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 3389 | +| +Apply | 2 | | 1 | 0 | 0 | | | | | | |
| 3390 | +| |\ +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 3391 | +| | +ArgumentTracker | 6 | | 1 | 0 | 0 | 736 | | | | | |
| 3392 | +| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 3393 | +| | +MergeInto | 3 | MERGE (s)-[anon_0:FRIENDS_WITH]->(s) | 1 | 1 | 1 | | | | | | |
| 3394 | +| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 3395 | +| | +Argument | 4 | s | 1 | 1 | 0 | 2288 | 1/0 | 1.626 | Fused in Pipeline 1 | | |
| 3396 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 3397 | +| +NodeIndexSeek | 5 | RANGE INDEX s:Person(name) WHERE name = $autostring_0 | 1 | 1 | 2 | 376 | 1/0 | 0.300 | In Pipeline 0 | range_person_name: 1 | |
| 3398 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
3399 | 3399 |
|
3400 | 3400 | Total database accesses: 15, total allocated memory: 2232 |
3401 | 3401 | ---- |
@@ -6036,25 +6036,25 @@ Runtime version {neo4j-version} |
6036 | 6036 |
|
6037 | 6037 | Batch size 128 |
6038 | 6038 |
|
6039 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
6040 | | -| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline | |
6041 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
6042 | | -| +ProduceResults | 0 | | 1 | 0 | 0 | | | | | |
6043 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
6044 | | -| +EmptyResult | 1 | | 1 | 0 | 0 | | | | | |
6045 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
6046 | | -| +Apply | 2 | | 1 | 1 | 0 | | | | | |
6047 | | -| |\ +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
6048 | | -| | +LockingMerge | 3 | CREATE (s)-[anon_0:FRIENDS_WITH]->(s), LOCK(s) | 1 | 1 | 1 | | | | | |
6049 | | -| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
6050 | | -| | +Expand(Into) | 4 | (s)-[anon_0:FRIENDS_WITH]->(s) | 0 | 0 | 10 | 904 | | | | |
6051 | | -| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | | |
6052 | | -| | +Argument | 5 | s | 1 | 3 | 0 | 2280 | 2/0 | 0.460 | Fused in Pipeline 1 | |
6053 | | -| | +----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
6054 | | -| +NodeIndexSeek | 6 | RANGE INDEX s:Person(name) WHERE name = $autostring_0 | 1 | 1 | 2 | 376 | 1/0 | 0.211 | In Pipeline 0 | |
6055 | | -+-----------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+ |
6056 | | -
|
6057 | | -Total database accesses: 15, total allocated memory: 2232 |
| 6039 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 6040 | +| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline | Indexes Used | |
| 6041 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 6042 | +| +ProduceResults | 0 | | 0 | 0 | 0 | | | | | | |
| 6043 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 6044 | +| +EmptyResult | 1 | | 0 | 0 | 0 | | | | | | |
| 6045 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 6046 | +| +Apply | 2 | | 0 | 0 | 0 | | | | | | |
| 6047 | +| |\ +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 6048 | +| | +ArgumentTracker | 6 | | 0 | 0 | 0 | 696 | | | | | |
| 6049 | +| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 6050 | +| | +MergeInto | 3 | MERGE (s)-[anon_0:FRIENDS_WITH]->(s) | 0 | 0 | 0 | | | | | | |
| 6051 | +| | | +----+-------------------------------------------------------+----------------+------+---------+----------------+ | | +----------------------+ |
| 6052 | +| | +Argument | 4 | s | 0 | 0 | 0 | 128 | 0/0 | 0.000 | Fused in Pipeline 1 | | |
| 6053 | +| | +----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 6054 | +| +NodeIndexSeek | 5 | RANGE INDEX s:Person(name) WHERE name = $autostring_0 | 0 | 0 | 1 | 376 | 1/0 | 0.257 | In Pipeline 0 | range_person_name: 1 | |
| 6055 | ++--------------------+----+-------------------------------------------------------+----------------+------+---------+----------------+------------------------+-----------+---------------------+----------------------+ |
| 6056 | +
|
| 6057 | +Total database accesses: 1, total allocated memory: 1280 |
6058 | 6058 | ---- |
6059 | 6059 |
|
6060 | 6060 | ====== |
|
0 commit comments