|
4 | 4 |
|
5 | 5 | Query String
|
6 | 6 | ==================
|
7 |
| -g.V().hasLabel("airport").has("code", "AUS").emit().repeat(in().simplePath()).times(2).limit(100) |
| 7 | +g.V().has('code','LHR').outE().inV().path().by(valueMap(true)).limit(5) |
| 8 | + |
8 | 9 |
|
9 | 10 | Original Traversal
|
10 | 11 | ==================
|
11 |
| -[GraphStep(vertex,[]), HasStep([~label.eq(airport), code.eq(AUS)]), RepeatStep(emit(true),[VertexStep(IN,vertex), PathFilterStep(simple), RepeatEndStep],until(loops(2))), RangeGlobalStep(0,100)] |
| 12 | +[GraphStep(vertex,[]), HasStep([code.eq(LHR)]), VertexStep(OUT,edge), EdgeVertexStep(IN), PathStep([[PropertyMapStep(value)]]), RangeGlobalStep(0,5)] |
12 | 13 |
|
13 | 14 | Optimized Traversal
|
14 | 15 | ===================
|
15 | 16 | Neptune steps:
|
16 | 17 | [
|
17 | 18 | NeptuneGraphQueryStep(Vertex) {
|
18 | 19 | JoinGroupNode {
|
19 |
| - PatternNode[(?1, <code>, "AUS", ?) . project ?1 .], {estimatedCardinality=1, indexTime=84, hashJoin=true, joinTime=3, actualTotalOutput=1} |
20 |
| - PatternNode[(?1, <~label>, ?2=<airport>, <~>) . project ask .], {estimatedCardinality=3374, indexTime=29, hashJoin=true, joinTime=0, actualTotalOutput=61} |
21 |
| - RepeatNode { |
22 |
| - Repeat { |
23 |
| - PatternNode[(?3, ?5, ?1, ?6) . project ?1,?3 . IsEdgeIdFilter(?6) . SimplePathFilter(?1, ?3)) .], {hashJoin=true, estimatedCardinality=50148, indexTime=0, joinTime=3} |
24 |
| - } |
25 |
| - Emit { |
26 |
| - Filter(true) |
27 |
| - } |
28 |
| - LoopsCondition { |
29 |
| - LoopsFilter([?1, ?3],eq(2)) |
| 20 | + PatternNode[VP(?1, <code>, "LHR", <~>) . project ?1 .], {estimatedCardinality=1, expectedTotalOutput=1, indexTime=0, joinTime=0, numSearches=1, actualTotalOutput=1} |
| 21 | + PatternNode[EL(?1, ?5, ?3, ?6) . project ?1,?6,?3 . IsEdgeIdFilter(?6) .], {estimatedCardinality=INFINITY, expectedTotalInput=1, indexTime=0, joinTime=0, numSearches=1} |
| 22 | + }, finishers=[limit(5)], {path=[Vertex(?1):GraphStep, Edge(?6,?1,?3):VertexStep, Vertex(?3):EdgeVertexStep], joinStats=true, optimizationTime=2, maxVarId=15, executionTime=14} |
| 23 | + }, |
| 24 | + NeptunePathStep { |
| 25 | + NeptunePropertyMapStep { |
| 26 | + JoinGroupNode { |
| 27 | + PatternNode[VP(?1, ?8, ?9, <~>) .] |
| 28 | + }, {initialValues={?1=null, ?3=null, ?6=null}} |
| 29 | + }, |
| 30 | + NeptunePropertyMapStep { |
| 31 | + JoinGroupNode { |
| 32 | + UnionNode { |
| 33 | + PatternNode[EP(?6, ?10, ?11, <~>) .], {estimatedCardinality=63580} |
| 34 | + PatternNode[EL(?, ?12, ?, ?6) .], {estimatedCardinality=INFINITY} |
30 | 35 | }
|
31 |
| - }, annotations={repeatMode=BFS, emitFirst=true, untilFirst=false, leftVar=?1, rightVar=?3} |
32 |
| - }, finishers=[limit(100)], annotations={path=[Vertex(?1):GraphStep, Repeat[Vertex(?3):VertexStep]], joinStats=true, optimizationTime=495, maxVarId=7, executionTime=323} |
| 36 | + }, {initialValues={?1=null, ?3=null, ?6=null}} |
| 37 | + }, |
| 38 | + NeptunePropertyMapStep { |
| 39 | + JoinGroupNode { |
| 40 | + PatternNode[VP(?3, ?13, ?14, <~>) .] |
| 41 | + }, {initialValues={?1=null, ?3=null, ?6=null}} |
| 42 | + } |
33 | 43 | },
|
34 | 44 | NeptuneTraverserConverterStep
|
35 | 45 | ]
|
36 | 46 |
|
| 47 | + |
37 | 48 | Physical Pipeline
|
38 | 49 | =================
|
39 | 50 | NeptuneGraphQueryStep
|
40 | 51 | |-- StartOp
|
41 |
| - |-- JoinGroupOp |
42 |
| - |-- SpoolerOp(100) |
43 |
| - |-- DynamicJoinOp(PatternNode[(?1, <code>, "AUS", ?) . project ?1 .], {estimatedCardinality=1, indexTime=84, hashJoin=true}) |
44 |
| - |-- SpoolerOp(100) |
45 |
| - |-- DynamicJoinOp(PatternNode[(?1, <~label>, ?2=<airport>, <~>) . project ask .], {estimatedCardinality=3374, indexTime=29, hashJoin=true}) |
46 |
| - |-- RepeatOp |
47 |
| - |-- <upstream input> (Iteration 0) [visited=1, output=1 (until=0, emit=1), next=1] |
48 |
| - |-- BindingSetQueue (Iteration 1) [visited=61, output=61 (until=0, emit=61), next=61] |
49 |
| - |-- SpoolerOp(100) |
50 |
| - |-- DynamicJoinOp(PatternNode[(?3, ?5, ?1, ?6) . project ?1,?3 . IsEdgeIdFilter(?6) . SimplePathFilter(?1, ?3)) .], {hashJoin=true, estimatedCardinality=50148, indexTime=0}) |
51 |
| - |-- BindingSetQueue (Iteration 2) [visited=38, output=38 (until=38, emit=0), next=0] |
52 |
| - |-- SpoolerOp(100) |
53 |
| - |-- DynamicJoinOp(PatternNode[(?3, ?5, ?1, ?6) . project ?1,?3 . IsEdgeIdFilter(?6) . SimplePathFilter(?1, ?3)) .], {hashJoin=true, estimatedCardinality=50148, indexTime=0}) |
54 |
| - |-- LimitOp(100) |
| 52 | + |-- JoinGroupOp@2f500db7 |
| 53 | + |-- DynamicJoinOp@78b965ae(PipelineJoinOp(PatternNode[VP(?1, <code>, "LHR", <~>) . project ?1 .], {estimatedCardinality=1, expectedTotalOutput=1})) |
| 54 | + |-- SpoolerOp(100, @78b965ae, null) |
| 55 | + |-- DynamicJoinOp@67012ec9(PipelineJoinOp(PatternNode[EL(?1, ?5, ?3, ?6) . project ?1,?6,?3 . IsEdgeIdFilter(?6) .], {estimatedCardinality=INFINITY, expectedTotalInput=1})) |
| 56 | + |-- LimitOp(5) |
| 57 | + |
| 58 | +NeptunePathStep |
| 59 | + |-- BindingSetQueue |
| 60 | + |-- JoinGroupOp@6a996745 |
| 61 | + |-- DynamicJoinOp@417c3e4f(PipelineJoinOp(PatternNode[VP(?1, ?8, ?9, <~>) .])) |
| 62 | + |
| 63 | + |-- BindingSetQueue |
| 64 | + |-- JoinGroupOp@2b0c033 |
| 65 | + |-- UnionOp@44764c1 |
| 66 | + |-- MultiplexerOp |
| 67 | + |
| 68 | + |-- BindingSetQueue |
| 69 | + |-- JoinGroupOp@60bf88a9 |
| 70 | + |-- DynamicJoinOp@32903d93(PipelineJoinOp(PatternNode[VP(?3, ?13, ?14, <~>) .])) |
55 | 71 |
|
56 | 72 | Runtime (ms)
|
57 | 73 | ============
|
58 |
| -Query Execution: 392.686 |
59 |
| -Serialization: 2636.380 |
| 74 | +Query Execution: 18.669 |
| 75 | +Serialization: 15.464 |
60 | 76 |
|
61 | 77 | Traversal Metrics
|
62 | 78 | =================
|
63 | 79 | Step Count Traversers Time (ms) % Dur
|
64 | 80 | -------------------------------------------------------------------------------------------------------------
|
65 |
| -NeptuneGraphQueryStep(Vertex) 100 100 314.162 82.78 |
66 |
| -NeptuneTraverserConverterStep 100 100 65.333 17.22 |
67 |
| - >TOTAL - - 379.495 - |
68 |
| - |
69 |
| -Repeat Metrics |
70 |
| -============== |
71 |
| -Iteration Visited Output Until Emit Next |
72 |
| ------------------------------------------------------- |
73 |
| - 0 1 1 0 1 1 |
74 |
| - 1 61 61 0 61 61 |
75 |
| - 2 38 38 38 0 0 |
76 |
| ------------------------------------------------------- |
77 |
| - 100 100 38 62 62 |
| 81 | +NeptuneGraphQueryStep(Vertex) 5 5 2.152 20.56 |
| 82 | +NeptunePathStep([[NeptunePropertyMapStep], [Nep... 5 5 4.317 41.25 |
| 83 | +NeptuneTraverserConverterStep 5 5 3.997 38.19 |
| 84 | + >TOTAL - - 10.466 - |
78 | 85 |
|
79 | 86 | Predicates
|
80 | 87 | ==========
|
81 |
| -# of predicates: 16 |
82 |
| - |
83 |
| -WARNING: reverse traversal with no edge label(s) - .in() / .both() may impact query performance |
| 88 | +# of predicates: 18 |
84 | 89 |
|
85 | 90 | Results
|
86 | 91 | =======
|
87 |
| -Count: 100 |
88 |
| -Output: [v[3], v[3600], v[3614], v[4], v[5], v[6], v[7], v[8], v[9], v[10], v[11], v[12], v[47], v[49], v[136], v[13], v[15], v[16], v[17], v[18], v[389], v[20], v[21], v[22], v[23], v[24], v[25], v[26], v[27], v[28], v[416], v[29], v[30], v[430], v[31], v[9... |
89 |
| -Response serializer: GRYO_V3D0 |
90 |
| -Response size (bytes): 23566 |
| 92 | +Count: 5 |
| 93 | +Output: [path[{country=[UK], code=[LHR], longest=[12799], city=[London], lon=[-0.461941003799], type=[airport], label=airport, elev=[83], icao=[EGLL], id=49, runways=[2], region=[GB-ENG], lat=[51.4706001282], desc=[London Heathrow]}, {dist=3533, id=9144, lab... |
| 94 | +Response serializer: application/vnd.gremlin-v3.0+json |
| 95 | +Response size (bytes): 10162 |
| 96 | + |
91 | 97 |
|
92 | 98 | Index Operations
|
93 | 99 | ================
|
94 | 100 | Query execution:
|
95 |
| - # of statement index ops: 3 |
96 |
| - # of unique statement index ops: 3 |
| 101 | + # of statement index ops: 18 |
| 102 | + # of unique statement index ops: 18 |
97 | 103 | Duplication ratio: 1.0
|
98 | 104 | # of terms materialized: 0
|
99 | 105 | Serialization:
|
100 |
| - # of statement index ops: 200 |
101 |
| - # of unique statement index ops: 140 |
102 |
| - Duplication ratio: 1.43 |
103 |
| - # of terms materialized: 393 |
| 106 | + # of statement index ops: 18 |
| 107 | + # of unique statement index ops: 18 |
| 108 | + Duplication ratio: 1.0 |
| 109 | + # of terms materialized: 0 |
0 commit comments