Last active
February 23, 2024 13:52
-
-
Save spmallette/3dc8ae73f9f26060fa163ef43affcef7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// * Improved performance of the application of `FilterRankingStrategy` for large traversals with deeply nested traversals by improving the cache operation. | |
g.V().as("n"). | |
where(__.or(__.select("n").hasLabel("software"), __.select("n").hasLabel("person"))). | |
select("n").by("name") | |
before | |
FilterRankingStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
after | |
FilterRankingStrategy [O] [GraphStep(vertex,[]), TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])])@[n], SelectOneStep(last,n,value(name))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gremlin> g.V().as("n"). | |
......1> where(__.or(__.select("n").hasLabel("software"), __.select("n").hasLabel("person"))). | |
......2> select("n").by("name").explain() | |
==>Traversal Explanation | |
============================================================================================================================================================================================================================================================== | |
Original Traversal [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
ConnectiveStrategy [D] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
RepeatUnrollStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
CountStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
IdentityRemovalStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
MatchPredicateStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
FilterRankingStrategy [O] [GraphStep(vertex,[]), TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])])@[n], SelectOneStep(last,n,value(name))] | |
InlineFilterStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
EarlyLimitStrategy [O] [GraphStep(vertex,[]), OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])@[n], SelectOneStep(last,n,value(name))] | |
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]), OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])@[n], SelectOneStep(last,n,value(name))] | |
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
PathRetractionStrategy [O] [GraphStep(vertex,[]), OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])@[n], SelectOneStep(last,n,value(name))] | |
LazyBarrierStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[]), OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])@[n], SelectOneStep(last,n,value(name))] | |
TinkerGraphCountStrategy [P] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
ProfileStrategy [F] [TinkerGraphStep(vertex,[]), OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])@[n], SelectOneStep(last,n,value(name))] | |
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
Final Traversal [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gremlin> g.V().as("n"). | |
......1> where(__.or(__.select("n").hasLabel("software"), __.select("n").hasLabel("person"))). | |
......2> select("n").by("name").explain() | |
==>Traversal Explanation | |
============================================================================================================================================================================================================================================================== | |
Original Traversal [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
ConnectiveStrategy [D] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
RepeatUnrollStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
CountStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
IdentityRemovalStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
MatchPredicateStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
FilterRankingStrategy [O] [GraphStep(vertex,[])@[n], TraversalFilterStep([OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]])]), SelectOneStep(last,n,value(name))] | |
InlineFilterStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
EarlyLimitStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
PathRetractionStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
LazyBarrierStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
TinkerGraphCountStrategy [P] [GraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
ProfileStrategy [F] [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] | |
Final Traversal [TinkerGraphStep(vertex,[])@[n], OrStep([[SelectOneStep(last,n,null), HasStep([~label.eq(software)])], [SelectOneStep(last,n,null), HasStep([~label.eq(person)])]]), SelectOneStep(last,n,value(name))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment