--
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.
For more options, visit https://groups.google.com/d/optout.
How many paths are returned from your query?
MATCH p = (n)-[*0..2]-(m)where id(n) = 103105 and id(m) = 1386672return p, reduce(totProximity = 0, n IN relationships(p)| totProximity + n.proximity) AS pathProximityorder by pathProximity DESC;your index is on :Topic(name) ?
and enter:profile MATCH p = (n)-[*0..2]-(m)where id(n) = 103105 and id(m) = 1386672return p, reduce(totProximity = 0, n IN relationships(p)| totProximity + n.proximity) AS pathProximityorder by pathProximity DESC;
and share the results
Hello,I've done a lot of RDBMS performance tuning.Just a few quick thoughts.Be sure to run the queries in the shell, if you are not already doing so.
How many rows are returned? Just sorting, then returning many rows,takes a long time to scroll them to output.
If you are getting duplicates, it may be the equivalent of a cartesian product,one of the worst things that can happen in RDBMS, and also oneof the least known. See my presentation on them here:
Try:return p, count (*)order by count(*)
Without me looking at the raw data, and the query result, youseem to have many operations going on. So, you have a lot of rows inthe profile output.
As a general rule, the more rows there are in theprofile, the slower the response time is.ie. the more complex the query, the slower it is.If I were looking at this, I would try to isolate which part ofthe query is the slow part. The Return clause, or the Match clause?You've already tried the response times with the data.Try to simply:return count(*) .
How many seconds response time is that, versus the original query?What is the resulting profile?
See also the tuning presentations I've done:They are quick reads.
your aggregation was only on the same paths, so you get 9 different paths but you didn't show the counts per path.
1.
...</s
...
...
Importing 111111001 Relationships took 478 seconds
# Default values for the low-level graph engine
neostore.nodestore.db.mapped_memory=250M
neostore.relationshipstore.db.mapped_memory=500M
neostore.propertystore.db.mapped_memory=250M
neostore.propertystore.db.strings.mapped_memory=250M
Nodes.csv
id:int:source_id NodeType:label name:string:topic
id:int:source_id id:int:source_id type proximity:int