8000 In-memory value joins read the whole attribute once per query (v3) · Issue #723 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

In-memory value joins read the whole attribute once per query (v3) #723

Closed

Description

@adityamukho

Split from #721 (fix: #722). v3 only.

Gap

An in-memory database has no committed generation: every fact lives in the in-memory fact store, which is ordered by entity and by attribute but not by value. A join on a bound value ([?x :up ?p] with ?p bound, #722's IndexNestedLoopJoin on the value) therefore reads every fact of the attribute once per query to find the facts with a value. File databases probe the committed AVET index and read only their few uncheckpointed facts this way.

Criterion recursion/ancestors/w10_d4 (in memory, 11,110 :up facts, bench profile, bench machine):

p50
before #700 (05352121) 0.27 ms
v3 before #722 97.7 ms
#722 15.1 ms (12 ms of it the one read of :up)

The same shape on a checkpointed file is 1.1–1.9 ms from 100K to 10M facts with #722.

Options

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

    performance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0