BTree scalar index on id for business index tables

Open
#477 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@chuiwenwei is already working on this.

Since Nov 6, 2026.

  • #578 by @chuiwenwei — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
database

Research direction

Start in core/persistence/lancedb/repository.py, at the TODO beside ensure_business_indexes and the rebuild_indexes() loop, then find where cascade rebuild calls into them. Before adding a BTree scalar index on id, the rebuild path must cover scalar indexes, and index-directory growth under real write cadence must be measured. Done means a BTree on id exists on the business tables, explain_plan shows ScalarIndexQuery for id lookups, and the growth check is recorded.

Written by the indexing model from the issue text.

Description

enhancement

No scalar index exists on any LanceDB business table; every WHERE id = … lookup and every merge_insert match is a full scan. Measured on 100k rows (lancedb 0.34, 2026-10-09): scoped point lookup 3.6 ms → 0.8 ms and a 100-row multi-column merge_insert 11.2 ms → 3.6 ms with a BTree on id (explain_plan shows ScalarIndexQuery).

Not urgent — cascade per-file time is dominated by embedding calls — but a real win. Prerequisites before adding it: wire scalar indexes into the rebuild_indexes() loop and cascade rebuild, and verify index-directory growth under the real write cadence (see the index-UUID bloat note in core/persistence/lancedb/repository.py).

A TODO next to ensure_business_indexes points here.

Dominant language
Python
Stars
13.3k
Forks
926
Avg merge
1d 10h
Merged PRs (30d)
57

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EverMind-AI/EverOS

All issues in EverMind-AI/EverOS

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.