Skip to content

List-view performance follow-ups: remaining count fast paths, batched joins on list predicates, carried-forward discovery #2173

Open

Description

@bplatz

Follow-up from #2159. On a ledger that has held a list:

  • Whole-graph fast paths still off: COUNT(DISTINCT ?s|?p|?o) over ?s ?p ?o, whole-graph scalar aggregates, and literal-object / blank-node-subject counts fall back to a full scan. fix(sparql): read and write RDF lists as RDF #2159 corrects COUNT(*) and GROUP BY ?p from the index's list census; distinct subjects (+ one cell per member) and distinct predicates (+ rdf:first/rdf:rest) are the same kind of arithmetic, and distinct objects needs more care.
  • Batched joins on a list predicate: a join whose right side is a predicate holding list members (e.g. ?s ex:items ?x from an earlier pattern, or SHACL sh:in) runs as a per-row nested loop. The batched subject, object and exists lanes need a member filter on o_i, with the column added to their projections (the object lane's clean path does not load it today).
  • Startup discovery: carry the list-predicate set forward across index builds (old set plus novelty's), so only a cold process walks directories.

Measure with cargo bench -p fluree-db-api --bench query_hot_list_view.

Activity

  1. added
    P3
    area:query
    on Oct 24, 2026
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

    P3area:query

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions