8000 perf(post-1.0): B+Tree selective lookup for bound patterns · Issue #208 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

perf(post-1.0): B+Tree selective lookup for bound patterns #208

Closed

Description

@adityamukho

Roadmap source

ROADMAP.md: Post-1.0 Performance Backlog.

Problem

filter_facts_for_query step 1 calls get_all_facts(), causing a full B+tree range scan even when a query binds a concrete entity or attribute that could use existing EAVT/AEVT indexes.

Proposed fix

Inspect query patterns before calling get_all_facts(). If a pattern binds a concrete entity or entity+attribute, use get_facts_by_entity / get_facts_by_attribute to fetch only the relevant subset.

Acceptance criteria

  • Use selective index-backed fetches for eligible bound patterns.
  • Keep existing snapshot/retraction/valid-time semantics intact.
  • Add tests for entity-bound and attribute-bound queries.
  • Add benchmarks showing sub-linear behavior for point entity/attribute queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceBenchmark performance regressionsrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0