Skip to content

q5 from LDBC SNB complex14 set regressed #1369

Closed

Description

@adsharma

uv pip install -i https://test.pypi.org/simple/ ladybug==0.22.0.dev20261017
python query_complex14.py 5

Query 5:

        MATCH (person:Person {ID: $personId})-[:knows*1..2]-(friend:Person)
        WHERE NOT person = friend
        WITH DISTINCT friend
        MATCH (friend)<-[membership:hasMember]-(forum:Forum)
        WHERE membership.joinDate > TIMESTAMP($minDate)
        WITH forum, COLLECT(friend) AS friends
        OPTIONAL MATCH (author:Person)<-[:postHasCreator]-(post:Post)<-[:containerOf]-(forum)
        WHERE author IN friends
        WITH forum, COUNT(post) AS postCount
        RETURN forum.title AS forumName, postCount
        ORDER BY postCount DESC, forum.ID ASC
        LIMIT 20;

shape: (20, 2)
...
Completed 1 query(ies) in 1.14s

Same query regressed to 2.34s on ladybug==0.22.0.dev20261021

Cc: @zahariash

Activity

  1. adsharma commented on Oct 23, 2026

    @adsharma
    ContributorAuthor

    hyperdimensionalcomputingai/graph-benchmark-ldbc#17 has the queries. @prrao87 prefers a separate repo.

  2. zahariash commented on Oct 23, 2026

    @zahariash
    Contributor

    Looking into it.

  3. zahariash commented on Oct 24, 2026

    @zahariash
    Contributor

    This is the lookup join from #1285, which landed between the two nightlies. On a build of the 10-21 nightly's commit, turning off only the lookup join gives back the 10-17 plan and instruction count for q5, so nothing else in that range is involved.

    The cap checks the outer side's estimate before flattening it. Here that is 73 rows, while the flattened estimate is 11,895 and the actual probe count is 1,569,282. #1370 checks the flattened estimate instead, which puts q5 back on the hash join and keeps the lookups in q1, q3, q7 and q17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions