lance-format / lance-format/lance
Optimize count query plans with just fragment filter to be metadata-only
Open
Nobody has claimed this yet.
performance
rust
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
This plan seems to actually scan a lot of data, even though it could be satisfied with fragment metadata:
let mut scanner = dataset.scan();
scanner.with_fragments(resolve_scan_fragments(dataset, fragment_ids)?);
scanner.count_rows().await? as usize
https://github.com/lance-format/lance/pull/6930#pullrequestreview-4376136132
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the scan path around dataset.scan(), resolve_scan_fragments(dataset, fragment_ids), and scanner.count_rows(), then inspect the linked pull request review for context. Trace whether count_rows can use fragment metadata for the selected fragments without reading data; done means this plan is metadata-only and its behavior is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100