Hi Michael, again, sorry for the late reply. I am using another query now, but I can tell you that the outlined query returned 100K paths. Server had 12G of memory available. Since your mentioned different pattern matching after WITH statements: I am using variables with WITH extensively. Is this recommended or should it rather be avoided?
On Monday, July 6, 2015 at 1:05:12 AM UTC+2, Michael Hunger wrote: > > how many paths does this return? > > MATCH (n:Contact)--(:ActivityContact)--(ar:ActivityReport) RETURN count(*) > > the second query causes cypher to use a different pattern matcher (which > is suboptimal) but it should not run forever. > > you can see this if you prefix your queries with PROFILE or EXPLAIN > > > Am 04.07.2015 um 23:24 schrieb Markus Hofer <[email protected] > <javascript:>>: > > The following query works and inserts 8000 nodes in 3 seconds > > > MATCH (n:Contact)--(:ActivityContact)--(ar:ActivityReport) >> WHERE ar.StartDateTime > timestamp() >> >> WITH DISTINCT n, COUNT(ar) AS val >> CREATE (s:ScoreFactor { >> name: "ContactActivities", >> value: val >> }) >> CREATE (n)-[:HasScoreFactor]->(s) > > > > However, if I define ANY variable like, the query runs unlimited and does > not insert any node at all. > I think this is a bug. > > *WITH timestamp() AS cutoff* >> MATCH (n:Contact)--(:ActivityContact)--(ar:ActivityReport) >> WHERE ar.StartDateTime > cutoff >> >> WITH DISTINCT n, COUNT(ar) AS val >> CREATE (s:ScoreFactor { >> name: "ContactActivities", >> value: val >> }) >> CREATE (n)-[:HasScoreFactor]->(s) > > > -- > 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] <javascript:>. > 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.
