I tested the query like (a:A) --> (b:B) in two graphs. The two graphs have the same graph structure, which means same number of nodes and edges. The edges are connecting the same two nodes in the two graphs. The only difference is that the first graph has only two labels A and B and the second graph has ten different labels, which is from A to I. For this same query, query time in the second graph is about 30x worse than that in the first graph.
Is there any feasible explanation for this? On Thursday, July 6, 2017 at 9:10:24 PM UTC-7, Michael Hunger wrote: > > The index lookup is used when using labels with properties > The label scan store that I described is used for all label scan > > Von meinem iPhone gesendet > > Am 07.07.2017 um 03:31 schrieb Sun Yuhan <[email protected] <javascript:> > >: > > Actually I am using the neo4j to execute some graph pattern query ( > subgraph isomorphism). So the given query pattern will be a labeled graph > and the results are all subgraphs in the database that can fit the pattern. > Does the index you mentioned in the reply can achieve better performance > than using labels? > > On Wednesday, July 5, 2017 at 1:32:15 AM UTC-7, Michael Hunger wrote: >> >> It should be a rare operation if you have indexes in place >> >> There is a reverse store mapping labels to sets of node ids >> >> In 3.1 it uses a compressed lucene format >> In 3.2 a custom generational b+ tree >> Details for both are only in the source >> >> >> >> Von meinem iPhone gesendet >> >> Am 05.07.2017 um 07:31 schrieb Sun Yuhan <[email protected]>: >> >> The NodeByLabelScan is very commonly used in cypher query execution >> plans. However, it is not clear how this operation is executed in neo4j. >> >> What's more, I do not know how the label is managed and stored in neo4j. >> Are there any materials online that I can refer to? Or I can refer to some >> source code of neo4j to see the implementation details. >> >> -- >> 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 [email protected]. >> 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 [email protected] <javascript:>. > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
