benchmarks's People
Forkers
inversefalconbenchmarks's Issues
InteractiveComplex4
InteractiveComplex7
InteractiveComplex3
InteractiveComplex9
InteractiveComplex13
InteractiveComplex10
BusinessIntelligence-12
I thought I had this faster but this is 22seconds
match (message:Message)
WHERE message.creationDate > 20111021192109382
and
size((message)<-[:LIKES]-()) > 400
with message order by size((message)<-[:LIKES]-()) > 400 limit 100
match (message:Message)-[:HAS_CREATOR]->(creator:Person)
RETURN
message.id,
message.creationDate,
creator.firstName,
creator.lastName,
size((message)<-[:LIKES]-()) as likeCount
ORDER BY
likeCount DESC,
message.id ASC
InteractiveComplex8
BusinessIntelligence1
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;
InteractiveComplex14
BusinessIntelligence-14
Added index on :Post(creationDate)
BL-16
MATCH (p:Person {id: 19791209310731})
with p
call apoc.path.subgraphNodes(p, {maxLevel:5, relationshipFilter:'KNOWS'})
yield node
with distinct node as person
MATCH
(person)-[:IS_LOCATED_IN]->(:City)-[:IS_PART_OF]->(:Country {name: 'Pakistan'})
with distinct person
match
(person)<-[:HAS_CREATOR]-(message:Message)-[:HAS_TAG]->(tag:Tag)-[:HAS_TYPE]->
(:TagClass {name: 'MusicalArtist'})
RETURN
person.id,
tag.name,
count(DISTINCT message) AS messageCount
ORDER BY
messageCount DESC,
tag.name ASC,
person.id ASC
LIMIT 100
BL-17
MATCH (country:Country {name: 'Spain'})
with country
MATCH (a:Person)-[:IS_LOCATED_IN]->(:City)-[:IS_PART_OF]->(country)
with collect(distinct a) as aPrime
with aPrime, aPrime as bPrime
unwind aPrime as ap
with ap,bPrime
unwind bPrime as bp
MATCH (ap)-[:KNOWS]-(bp)
where ap.id < bp.id
with ap, bp
match (bp)-[:KNOWS]-(c) where c.id<ap.id
and (c)-[:IS_LOCATED_IN]->(:City)-[:IS_PART_OF]->(:Country {name: 'Spain'})
and (c)-[:KNOWS]-(ap)
RETURN count(*) AS count
InteractiveComplex5
InteractiveComplex1
InteractiveComplex11
InteractiveComplex12
InteractiveComplex6
InteractiveComplex2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.