Hi Sun This is a good place to start: https://github.com/neo4j/neo4j/blob/3.2/community/cypher/cypher-compiler-3.2/src/main/scala/org/neo4j/cypher/internal/compiler/v3_2/planner/logical/CardinalityCostModel.scala
Cheers Petra Petra Selmer Engineer and member of the Cypher Language Group *Neo Technology* 8th Floor, Friars Bridge Court 41-45 Blackfriars Road London SE1 8NZ On 21 July 2017 at 02:33, Michael Hunger <[email protected]> wrote: > We currently only have the selectivity of the index, histograms on value > distributions are planned for some point in the future. > > So I think it mostly multiplies the total number by the selectivity, but > I'm not the expert there. > > Perhaps Petra can point you to the right place in the code? > > Cheers, Michael > > On Wed, Jul 19, 2017 at 9:53 PM, Sun Yuhan <[email protected]> wrote: > >> If such a query is given " match (n:PEOPLE) where 40 > n.age > 30 return >> n", how does the query optimizer estimate the number of rows returned by >> the query? I know for relational database, they have histogram information >> about distribution of values for each attribute. But for a graph database, >> how does this estimation is made? >> >> Or a point to the corresponding page of source code is really helpful. >> Thx! >> >> -- >> 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]. For more options, visit https://groups.google.com/d/optout.
