You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With index on :Message(creationDate), I was able to rewrite the query and get results in 110 seconds instead of 429
MATCH (message:Message)
WHERE message.creationDate < 20120501000000000
with toFloat(count(message)) as allMessages
match (message:Message)
WHERE message.creationDate < 20120501000000000
WITH allMessages, toFloat(count(message)) AS messageCount, message.creationDate/10000000000000 AS year, floor(avg(message.length)) AS averageMessageLength,message:Comment AS isComment,
sum(message.length) AS sumMessageLength,
CASE
WHEN message.length < 40 THEN 0
WHEN message.length < 80 THEN 1
WHEN message.length < 160 THEN 2
ELSE 3
END AS lengthCategory
return year, isComment, lengthCategory, messageCount, averageMessageLength, sumMessageLength, toFloat(messageCount/allMessages) as pctMessages;
The text was updated successfully, but these errors were encountered:
With index on :Message(creationDate), I was able to rewrite the query and get results in 110 seconds instead of 429
MATCH (message:Message)
WHERE message.creationDate < 20120501000000000
with toFloat(count(message)) as allMessages
match (message:Message)
WHERE message.creationDate < 20120501000000000
WITH allMessages, toFloat(count(message)) AS messageCount, message.creationDate/10000000000000 AS year, floor(avg(message.length)) AS averageMessageLength,message:Comment AS isComment,
sum(message.length) AS sumMessageLength,
CASE
WHEN message.length < 40 THEN 0
WHEN message.length < 80 THEN 1
WHEN message.length < 160 THEN 2
ELSE 3
END AS lengthCategory
return year, isComment, lengthCategory, messageCount, averageMessageLength, sumMessageLength, toFloat(messageCount/allMessages) as pctMessages;
The text was updated successfully, but these errors were encountered: