Choose index access and apply residual filters
An index on (a,b) can prune using a or (a,b), not generally b alone. Performance comparison must include identical results and cold/warm environment details.
Contract
| Field | Value |
|---|---|
| Specification | QUERY-005 |
| Module | index |
| Scope | Required implementation or delivery |
| Milestone | M2, due 2026-12-20 |
| Owner role | Storage / search — sjr24 |
| Implementation | Planned; scaffold only |
| Contract review | Team review required before implementation |
Interface
Planner.chooseAccess(schema, indexes, predicates)
These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.
Dependencies
- INDEX-006: Maintain every index on INSERT, UPDATE and DELETE
- QUERY-003: WHERE comparisons, column operands and AND
Acceptance checklist
- Use equality/range bounds including valid composite left prefixes
- Always evaluate remaining predicates; fallback scan returns the same multiset
- Track page reads and compare selective scan versus index on imported data
Verification
Completion rule
Link this spec and its GitLab issue in an MR into develop. Include relevant Linux evidence, obtain the other teammate’s review, merge, delete the feature branch, and close the issue. A page describes intended behavior; the GitLab issue and merged code determine completion.