In this Special case with a Limit of 20 accounts we have a resultset of 650 lines.
profile match (n:i636005417297252034)where n.type='person' with n limit 20 match p=((n:i636005417297252034)-[:rel_member*0..]->(x:i636005417297252034)<-[:rel_member*0..]-(gg:i636005417297252034)-[:rel_member*0..]->(m)) where n.type="person" and m.type="person" and not gg.sAMAccountName contains '_term_' and not (n.department = m.department or n.name= "" or m.name ="" or gg.grouptype="BuiltIn_Group" or gg.commonsid="1" or gg.name="domain users") and not id(n) = id(m) return n.name , n.department, m.name, m.department order by n.name The distance between could be 20 hops. The Domain is typical for Active direcory: we habe User -Members->Groups We want to identify Cluster of users over amount of Connections over the Groups. regards, Thomas Am Samstag, 4. Juni 2016 12:10:11 UTC+2 schrieb Michael Hunger: > Also, what's the max distance between a user and a group? > > what does your domain model look like? > > why do you have once (:Person)-[:rel_member]->(group) > and once (group)-[:rel_member]->(person) ?? > > why do you need x in between ? you never use it > > match > p=((n:Person:i636005417297252034:ProcessGroups)-[:rel_member*0..]->(x:Group???:ProcessGroups:i636005417297252034)<-[:rel_member*0..]-(gg:Group:ProcessGroups:i636005417297252034)-[:rel_member*0..]->(m:Person:ProcessGroups:i636005417297252034)) > > > WHERE not id(n) <> id(m) AND n.department <> m.department and > return n.name , n.department, m.name, m.department, collect (distinct > gg.name) > order by n.name > > In general I'd turn this into > > for all groups of label: :i636005417297252034 is there a var-length path > to a user with :Person:i636005417297252034, if so, return all other paths > to all other users with :Person:i636005417297252034 > > > > > > Am 04.06.2016 um 11:58 schrieb Michael Hunger < > michael...@neotechnology.com <javascript:>>: > > > > Please share the EXPLAIN plan > > > > This explodes probably into billions or trillions of paths. > > > > Some ideas: > > > > turn .type properties into labels > > create a label for all your conditions, e.g. :Process > > > > and use those labels instead: > > > > What type are M, GG and X ? > > > > What is the fan out across those types (min, max, avg) ? > > > > How many results are returned after it finishes? > > > > Michael > > > > Can you send this as ticket and your database to your Neo4j support > account? > > Or share your db with me? > > > >> Am 04.06.2016 um 09:23 schrieb 'tgomell' via Neo4j < > ne...@googlegroups.com <javascript:>>: > >> > >> We have a really complex question: > >> > >> We want to find the ammount of Groups over all paths between all users. > From all User to all User. The Amount of users is 8.000 and the amount of > all Groups is 15.000. This cypher request Needs days! Is there a way to > make this faster? > >> > >> match > p=((n:i636005417297252034)-[:rel_member*0..]->x<-[:rel_member*0..]-gg-[:rel_member*0..]->(m)) > > > >> where n.type="person" > >> and m.type="person" > >> and not gg.sAMAccountName contains '_term_' > >> and not (n.department = m.department > >> or n.name= "" > >> or m.name ="" > >> or gg.grouptype="BuiltIn_Group" > >> or gg.commonsid="1" > >> or gg.name="domain users") > >> and not id(n) = id(m) > >> return n.name , n.department, m.name, m.department, collect (distinct > gg.name) > >> order by n.name > >> > >> Best regards, Thomas > >> > >> -- > >> 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+un...@googlegroups.com <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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.