@@ -736,7 +736,7 @@ Consider the following query, which does not specify a unique target node and ge
736736----
737737PROFILE
738738MATCH p = ANY SHORTEST
739- (start:N {trail: ["C", "C", "A", "C", "A", "B", "B", "B", "A"]})--+
739+ (start:N {trail: ["C", "C", "A", "C", "A", "B", "B", "B", "A"]})--{2,}
740740 (end:N {level: 9})
741741RETURN count(*) AS pathCount
742742----
@@ -759,22 +759,22 @@ Due to the existence of multiple target nodes without a specified, unique proper
759759+-----------------------------------+----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+---------------+
760760| Operator | Id | Details | Estimated Rows | Rows | DB Hits | Memory (Bytes) | Page Cache Hits/Misses | Time (ms) | Pipeline |
761761+-----------------------------------+----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+---------------+
762- | +ProduceResults | 0 | `count(*)` | 1 | 1 | 0 | 0 | 0/0 | 0.015 | |
762+ | +ProduceResults | 0 | pathCount | 1 | 1 | 0 | 0 | 0/0 | 0.199 | |
763763| | +----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+ |
764- | +EagerAggregation | 1 | count(*) AS `count(*)` | 1 | 1 | 0 | 40 | 0/0 | 0.097 | In Pipeline 2 |
764+ | +EagerAggregation | 1 | count(*) AS pathCount | 1 | 1 | 0 | 40 | 0/0 | 2.975 | In Pipeline 2 |
765765| | +----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+---------------+
766- | +StatefulShortestPath(All, Trail) | 2 | SHORTEST 1 (start) ((`anon_3`)-[`anon_4`]-(`anon_5`)){1 , } (end) | 8052 | 19682 | 373974 | 81274328 | 65235 /0 | 330.475 | In Pipeline 1 |
766+ | +StatefulShortestPath(All, Trail) | 2 | SHORTEST 1 (start) ((`anon_3`)-[`anon_4`]-(`anon_5`)){2 , } (end) | 8052 | 19682 | 373982 | 82162292 | 65705 /0 | 586.334 | In Pipeline 1 |
767767| | | | expanding from: start | | | | | | | |
768768| | | | inlined predicates: end.level = $autoint_1 | | | | | | | |
769769| | | | end:N | | | | | | | |
770770| | +----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+---------------+
771- | +NodeUniqueIndexSeek | 3 | UNIQUE start:N(trail) WHERE trail = $autolist_0 | 1 | 1 | 2 | 376 | 3/0 | 0.106 | In Pipeline 0 |
771+ | +NodeUniqueIndexSeek | 3 | UNIQUE start:N(trail) WHERE trail = $autolist_0 | 1 | 1 | 2 | 376 | 3/0 | 0.232 | In Pipeline 0 |
772772+-----------------------------------+----+------------------------------------------------------------------+----------------+-------+---------+----------------+------------------------+-----------+---------------+
773773
774- Total database accesses: 373976 , total allocated memory: 81274688
774+ Total database accesses: 373984 , total allocated memory: 82162652
775775
7767761 row
777- ready to start consuming query after 40 ms, results consumed after another 331 ms
777+ ready to start consuming query after 83 ms, results consumed after another 592 ms
778778----
779779
780780If the query is rewritten with a `CALL` subquery the planner will use `StatefulShortestPath(Into)` which performs separate traversals for each individual source-target node pairs.
0 commit comments