Slow cypher query...

68 views
Skip to first unread message

kiteflo

unread,
Oct 4, 2012, 4:20:17 PM10/4/12
to ne...@googlegroups.com
Hi guys,

we have a cypher query looking like this, this query is executed within millis everythings's fine:

START spat=node:GEO_INDEX('withinDistance:[47.481606,7.7395731,50.0]'),user=node(19912) MATCH offer<-[rr?:REVIEW]-review,spat-[r1:MANUAL_SPATIAL_CONNECT]->loc-[r2:GEOFIES]->offer,user-[rbm:BOOKMARKED]->bookmark return spat


As soon as we extend the query with one more relationship the query will take about 7 seconds...:

START spat=node:GEO_INDEX('withinDistance:[47.481606,7.7395731,50.0]'),user=node(19912) MATCH offer<-[rr?:REVIEW]-review,spat-[r1:MANUAL_SPATIAL_CONNECT]->loc-[r2:GEOFIES]->offer,user-[rbm:BOOKMARKED]->bookmark-[rbmc:CATEGORY_LINK]->category return spat


Theres nothing strange about the CATEGORY_LINK relation and the category itself is a simple domain structure. How can we find out what's exactly lacking there? Running the two match queries separetely performs 100% fine so what could cause this slow down?

Thanx in advance, Florian;

Michael Hunger

unread,
Oct 4, 2012, 4:35:29 PM10/4/12
to ne...@googlegroups.com
What neo4j version are you running right now?

Any way to replace the optional relationship with a path where condition?

WHERE offer<-[rr:REVIEW]-review,

or in general how is the review used?

can you try to split this up into a first part then WITH spat, user and do the second match in the second part of the query?

HTH

Michael



--
 
 

Reply all
Reply to author
Forward
0 new messages