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
perf: compute net-assert on v8 index keys before resolving facts (O(live) point queries) #379
v8 EavtKey/AevtKey (on the v3 branch) carry value_bytes and asserted. The net_asserted_facts semantics can therefore be computed over index keys beforeresolve_fact_ref, and only surviving records resolved. Resolve cost becomes O(live facts). The key walk stays O(history), but it runs over B+tree leaf pages, which is far cheaper than a page resolve plus a postcard decode per record.
On v2.x (v7 keys) this isn't possible: the keys carry neither the value nor the asserted flag, and retraction records have their own validity window ([tx_id, ∞)), so liveness can only be decided after resolving every record. #323 therefore only narrows bound-entity scans to the queried attribute and cuts the per-record constant.
Scope: get_facts_by_entity_attribute_indexed, get_facts_by_entity, get_facts_by_attribute on the v3 branch, plus the executor's selective path. :as-of needs tx_count <= N applied on keys first.
Done on v3 in #459 (a4a1c6d): committed reads decide net-assert on index keys and translate only surviving entries; :as-of N counter queries take the selective index path. Ships in v3.0.0.
Activity
Merge pull request #459 from project-minigraf/perf/379-live-keys
adityamukho commentedon Oct 6, 2026
Done on
v3in #459 (a4a1c6d): committed reads decide net-assert on index keys and translate only surviving entries;:as-of Ncounter queries take the selective index path. Ships in v3.0.0.