You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MINUS, the union's fact dedup and COUNT(DISTINCT *) key a stored vector by decoding it #2483
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingperformancePerformance improvement (release notes: Performance)
MINUS, the union's fact dedup and COUNT(DISTINCT *) key a stored vector by decoding it: parsing its shard slice and widening each component to f64, once per row. DISTINCT, GROUP BY and the hash join use the vector's value key instead, which is a slice of its shard before the arena's identity table is built and a hash and canonical handle after.
From #2468's numbers (instructions:u, 100K subjects), MINUS on ?v across two predicates:
100K × 768
100K × 1536
before #2201 (keyed by handle, wrong once a vector repeats)
In a profile the hash is now about 10% of the run. Most of the rest of the gap is decoding.
What it takes
Each of the three keys rows its own way, so each needs a key that carries a vector's value key:
fluree-db-query/src/minus.rs: MinusKey(Vec<Binding>), built through normalize_for_key / normalize_for_key_cow.
fluree-db-query/src/union_fact.rs: the 16-byte KeyTerm set, which keeps an arena literal whole through normalize_for_key_cow.
fluree-db-query/src/aggregate.rs: CountDistinctAll, which keys whole solutions.
They need what the hashed operators already handle:
Keys from two arenas meet by a component compare only when their hashes match.
A failed shard read fails the query rather than keying two equal vectors apart, so each operator checks the key-read slot (ExecutionContext::check_key_reads) per batch.
On a residency host, the shards a batch reads are registered as missing first, so one retry round fetches them.
Done when
query_hot_vector_keying has MINUS cells before and after the identity tables are built, and the MINUS cost moves toward the hashed operators' ratio to main.
Answers are unchanged on SPARQL (and on JSON-LD for MINUS) for a vector repeated under one predicate and under two, before and after retractions. A failed vector read inside each operator fails the query.
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingperformancePerformance improvement (release notes: Performance)
Activity