Skip to content

Commit

Permalink
add optimizer microbenchmark queries
Browse files Browse the repository at this point in the history
Committed-by: bingqing.lbq from Dev container
  • Loading branch information
BingqingLyu committed Nov 14, 2023
1 parent 75fb73b commit 9a49f4a
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q1.1.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Match (author:PERSON)<-[:HASCREATOR]-(msg1:POST|COMMENT)
Return count(author);
2 changes: 2 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q1.2.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Match (author:PERSON)<-[:HASCREATOR]-(msg1:POST|COMMENT)<-[:REPLYOF]-(msg2:POST|COMMENT)
Return count(author);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q1.3.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (author:PERSON)<-[:HASCREATOR]-(msg1:POST|COMMENT)
where msg1.length > $len
Return count(author);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q1.4.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (author:PERSON)<-[:HASCREATOR]-(msg1:POST|COMMENT)<-[:REPLYOF]-(msg2:POST|COMMENT)
where msg2.length > $len
Return count(author);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q2.1.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (p1:PERSON)-[:KNOWS]->(p2:PERSON)
Where p1.id = $id1 and p2.id = $id2
Return count(p1);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q2.2.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (p1:PERSON)-[:KNOWS]->(p2:PERSON)-[:LIKES]->(comment:COMMENT)
Where p1.id = $id1 and p2.id = $id2 and comment.length > $len
Return count(p1);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q2.3.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (p1:PERSON)-[k:KNOWS]->(p2:PERSON)
Where k.creationDate > $date1 and k.creationDate < $date2
Return count(p2);
3 changes: 3 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q2.4.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Match (p1:PERSON)-[k:KNOWS]->(p2:PERSON)-[:LIKES]->(comment:COMMENT)
Where k.creationDate > $date1 and k.creationDate < $date2
Return count(p1);
4 changes: 4 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q3.1.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Match (comment:COMMENT)-[:HASCREATOR]->(person:PERSON),
(comment:COMMENT)-[:HASTAG]->(tag:TAG),
(person:PERSON) -[:HASINTEREST]->(tag:TAG)
Return count(person);
5 changes: 5 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q3.2.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Match (person1:PERSON)-[:LIKES]->(comment:COMMENT),
(comment:COMMENT)-[:HASCREATOR]->(person2:PERSON),
(person1:PERSON)-[:ISLOCATEDIN]->(place:PLACE),
(person2:PERSON) -[:ISLOCATEDIN]->(place:PLACE)
Return count(person1);
5 changes: 5 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q3.3.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Match (person1:PERSON)<-[:HASCREATOR]-(comment:COMMENT),
(comment:COMMENT)-[:REPLYOF]->(post:POST),
(post:POST)<-[:CONTAINEROF]-(forum:FORUM),
(forum:FORUM)-[:HASMEMBER]->(person2:PERSON)
Return count(person1);
7 changes: 7 additions & 0 deletions flex/resources/queries/examples/store_procedure/Q3.4.cypher
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Match (forum:FORUM)-[:CONTAINEROF]->(post:POST),
(forum:FORUM)-[:HASMEMBER]->(person1:PERSON),
(forum:FORUM)-[:HASMEMBER]->(person2:PERSON),
(person1:PERSON)-[:KNOWS]->(person2:PERSON),
(person1:PERSON)-[:LIKES]->(post:POST),
(person2:PERSON)-[:LIKES]->(post:POST)
Return count(person1);

0 comments on commit 9a49f4a

Please sign in to comment.