Summary
Optimize ORDER BY ... LIMIT N execution using top-k selection instead of full sort when safe.
Why
Current implementation sorts all candidate rows even when only a small prefix is needed.
Tasks
- Update execution logic in
nexum_core/src/executor/mod.rs
- Use a bounded structure (or equivalent approach) for top-k ordering
- Add benchmark coverage in
nexum_core/benches/executor_bench.rs
Acceptance Criteria
- Query results remain identical to full-sort behavior
- Benchmark shows reduced runtime for large datasets with small LIMIT
- Code is covered by regression tests
Summary
Optimize
ORDER BY ... LIMIT Nexecution using top-k selection instead of full sort when safe.Why
Current implementation sorts all candidate rows even when only a small prefix is needed.
Tasks
nexum_core/src/executor/mod.rsnexum_core/benches/executor_bench.rsAcceptance Criteria