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 
> <[email protected]>:
> 
> 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 <[email protected]>:
>> 
>> 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 [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.

Reply via email to