d.r.91
d.r.91

Reputation: 133

Neo4j-Browser: Query does not return result but displays no error in addition

I have run the following query

MATCH p=((s:Station {})-[:VERBINDUNG*]-(t:Station)) 
RETURN s.name, t.name, count(p) as pfade ORDER BY pfade DESC LIMIT 10;

I know it has to traverse a lot of relationships but there is no problem with the Java heap space as I monitor the ressources in the task manager. After one hour of running no error is displayed, but in addition the symbol which shows that the query is running is disappeared as well and no result can be seen.

As I look into the task manager it seems that the query is still running because the same ressources are used. How do I know if the query will ever finish and will the result get displayed?

Upvotes: 0

Views: 336

Answers (1)

Stefan Armbruster
Stefan Armbruster

Reputation: 39915

Depending on the shape of your graph this query can get super expensive due to unlimited variable path length. Also it's a global query without any defined start point(s). Even worse you apply an ORDER BY which prevents the query from returning its results in streaming mode.

I guess you should rethink what result you expect from your query. Maybe you can limit the depth, maybe limit start and end points. Do you really want all the paths or are you just interested in the shortest one? If so, there's a shortestPath function.

Have you tried to press the close symbol "x" in the result pane? This should terminate a running query.

To check if you run into memory issues, look into messages.log.

Upvotes: 3

Related Questions