So basically it's like oracles CBO (Cost Based Optmizer)? Does the system build a statistics based off of the data or will it provide a means to run stats say nightly to help inform the system on the best execution path?
I'll take a look at the code when I get home. On Sunday, May 25, 2014, Michael Hunger <michael.hun...@neotechnology.com> wrote: > This code is currently rewritten in the cypher-compiler-2.1. module, the > team develops a new query planner that takes a different approach on > selecting sources and combining operations. > > You can find it here: > https://github.com/neo4j/neo4j/tree/master/community/cypher/cypher-compiler-2.1/src/main/scala/org/neo4j/cypher/internal/compiler/v2_1/planner > > It uses a set of incrementally build plans with costs and cardinalities to > choose from containing different operations. The cheapest plan is selected > to continue combining operations. > > The team did a presentation a while ago, I can try to find the slides. > > michael > > > > On Mon, May 26, 2014 at 3:26 AM, Richard L. Burton III <mrbur...@gmail.com > > wrote: > > Any pointers as to what part of the code I could look at that does the > cross product matching? > > I'm curious to how that is done and if there's any way to improve upon the > speed of this comparison. > > > On Sunday, May 25, 2014, Michael Hunger <michael.hun...@neotechnology.com> > wrote: > > Actually not, it depends on the query: > > if you do: > > start friend = node:Users("name:*Rich*") > match (me:User {name:"Michael Hunger")-[:FRIEND]->()-[:FRIEND]->(friend) > return friend > > A stream of nodes is returned from the fulltext search and a single node > from the exact lookup and then the pattern matcher tries to find patterns > between the cross product of the two sets. > > Whereas: > > match (me:User {name:"Michael Hunger")-[:FRIEND]->()-[:FRIEND]->(friend) > where friend.name =~ ".*Rich.*" > return friend > > Only traverses the graph and does a property check on the friends of > friends. > > Depending on the selectivity of your fulltext lookup and the sizes of your > second degree network the one or the other is faster. > > Michael > > > > On Sun, May 25, 2014 at 6:06 AM, Richard Burton <mrbur...@gmail.com>wrote: > > Let me clarify the actual question by using an example. > > When doing a full-text search against say a users 'friends of friends' > graph, two collections are created from what I understand. > > One set that reflects the results from the Lucene search and one set from > the graph search (friends of friends). > > I briefly looked over the Neo4J source and it seems that the comparison of > these two sets is done by simply iterating over one collection and checking > the existence of the element in the opposing set. > See org.neo4j.cypher.internal.compiler.v2_1.commands.InCollection#isMatch > > Is this the right portion of code I should be looking at to see how Neo4j > narrows down the results from Lucene against the Neo4j results? > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > > -- > -Richard L. Burton III > @rburton > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscribe@googleg -- -Richard L. Burton III @rburton -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.