cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
86 stars 7 forks source link

IS6. Forum of a message, does not terminate #74

Closed Dtenwolde closed 2 months ago

Dtenwolde commented 10 months ago

Query IS 6 from the LDBC SNB Interactive workload does not terminate due to the replyOf edge. This edge is supposed to find the original post of a comment, which can be 0 or more steps from any message.

The Post node in this case is inherited from the Message node. It could be that this table is too large for the number of shortest paths to calculate. The SQL:1999 way would be to traverse the ParentMessageId until this value is NULL, in which case you have found the post. We do path-finding to all other Message nodes, only one of which is not NULL (the parent Post).


-FROM GRAPH_TABLE (snb_projected
    MATCH o = ANY SHORTEST (message:Message WHERE message.id = 1236950622552)-[r:replyOf_Post]-> *(p:Post)<-[c:containerOf]-(forum:Forum)-[hm:hasModerator]->(moderator:Person)
    COLUMNS (forum.id, forum.title, moderator.id, moderator.firstName, moderator.lastName)
    ) tmp;

image

Dtenwolde commented 10 months ago

Seems not to be a concern in release mode, debug mode is very slow (somewhat to be expected). Likely due to a BLOCKWISE_NL_JOIN is6-analyze.txt

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.