Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update queries to properly showcase factorized join execution #27

Merged
merged 4 commits into from
Sep 7, 2023

Conversation

prrao87
Copy link
Owner

@prrao87 prrao87 commented Sep 7, 2023

Updates

The aim of this PR is to showcase the power of Kùzu's factorized joins with the simplest queries possible. As a result, query 10 is removed, and queries 8 and 9 are rewritten as follows.

Query 8:
 
        MATCH (a:Person)-[r1:Follows]->(b:Person)-[r2:Follows]->(c:Person)
        RETURN count(*) AS numPaths
    

        Number of second-degree paths:
shape: (1, 1)
┌──────────┐
│ numPaths │
│ ---      │
│ i64      │
╞══════════╡
│ 58431994 │
└──────────┘
        

Query 9:
 
        MATCH (a:Person)-[r1:Follows]->(b:Person)-[r2:Follows]->(c:Person)
        WHERE b.age < $age_1 AND c.age > $age_2
        RETURN count(*) as numPaths
    

        Number of paths through persons below 50 to persons above 25:
shape: (1, 1)
┌──────────┐
│ numPaths │
│ ---      │
│ i64      │
╞══════════╡
│ 45632026 │
└──────────┘

This clearly showcases how effective Kùzu's factorized joins are when passing through nodes that have a lot of many-to-many relationships.

@prrao87 prrao87 merged commit 015f7a5 into main Sep 7, 2023
@prrao87 prrao87 deleted the update-queries branch September 7, 2023 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant