Re: [Neo4j] Query performance on distinct paths

2017-01-28 Thread Marwa Elabri
Hi pleae I can not use shortestPath when I want to return relationship properties?? for example I made like this MATCH shortestPath((n:movie)<-[r:rating]-(m:user)) with distinct n,m,r return n.genre, m.age,r.likes but I got an error Expected `r` to be a Map but it was a Collection thanks in

Re: [Neo4j] Query performance on distinct paths

2017-01-17 Thread tomasz . kaszuba
The shortestPath: shortestPath( (ea)<-[:maps_to*]-(eb) ) before: +VarLengthExpand(All) | 128 | 669618290 | 1494585385 | | (ea)<-[:maps_to*]-(eb) after: | +ShortestPath | 28884702 | 678 | 169955 | | +CartesianProduct | 28884702 | 169955 |0 | Since I ha

Re: [Neo4j] Query performance on distinct paths

2017-01-17 Thread 'Michael Hunger' via Neo4j
Which one did the change and would you be able to share the query plan for that fast query with us? Michael On Tue, Jan 17, 2017 at 10:46 AM, wrote: > Did the change and the time went down to 20 seconds! > > Incredible. > > Thanks for the hint! > > > On Tuesday, 17 January 2017 07:59:52 UTC+1,

Re: [Neo4j] Query performance on distinct paths

2017-01-17 Thread tomasz . kaszuba
Did the change and the time went down to 20 seconds! Incredible. Thanks for the hint! On Tuesday, 17 January 2017 07:59:52 UTC+1, tomasz@closeit.cz wrote: > > Yes, there are indexes. > > I was wondering about the shortest path but I need all the paths that end > at specific nodes, usually

Re: [Neo4j] Query performance on distinct paths

2017-01-16 Thread tomasz . kaszuba
Yes, there are indexes. I was wondering about the shortest path but I need all the paths that end at specific nodes, usually they will not be the shortests. I will try to see if the results are the same with this modification. On Tuesday, 17 January 2017 03:31:59 UTC+1, Michael Hunger wrote: >

Re: [Neo4j] Query performance on distinct paths

2017-01-16 Thread 'Michael Hunger' via Neo4j
I presume you have an index / constraint on nodeType1.fullname AND nodeType1.name?! not sure why you do the pattern match first and only then the property lookup. What version are you using? in Neo4j 3.1 for the query below you should see much better performance: match (ea:nodeType1 {name:"some

[Neo4j] Query performance on distinct paths

2017-01-16 Thread tomasz . kaszuba
Hi, I have a very expensive query that I'm trying to figure out how to optimise. match (ea:nodeType1 {name:"something1"})<-[:maps_to*]-(eb:nodeType1) with distinct ea, eb match (eb) where eb.fullname starts with "something" return ea.name , eb.name ; I've used