Skip to content

v2.11.0#49

Merged
sphildreth merged 9 commits into
mainfrom
pk-lookup-profiled
Jun 12, 2026
Merged

v2.11.0#49
sphildreth merged 9 commits into
mainfrom
pk-lookup-profiled

Conversation

@sphildreth

Copy link
Copy Markdown
Owner

Fixed

  • Removed the 250,000-row limit on the paged row locator cache that caused
    indexed equality lookups on large checkpointed tables to degrade to
    O(manifest_size) per-row linear scans. The cache is now built for all
    tables with btree indexes or row_id alias columns, regardless of row count.
    This fixes multi-second indexed lookups observed on tables with millions of
    rows (Melodee DDB-002/DDB-003).
  • Refreshed reader and prepared-statement checkpoint handling so same-handle
    and FFI callers continue to read and commit correctly after WAL checkpoint
    truncation.
  • Hardened faulty-VFS write handling used by WAL recovery tests so injected
    partial-write failures preserve the expected file state.

Added

  • Added executor support for bounded indexed range seeks with optional limits,
    expanding the fast path beyond exact equality probes.
  • Added regression tests for indexed seek performance on checkpointed/paged
    tables with 300K+ rows, verifying bounded lookup time after checkpoint and
    reopen.
  • Added design/METRIC_IMPROVEMENTS_PLAN.md to track DecentDB's current
    benchmark standing against SQLite and the priority order for closing or
    exceeding each public-facing metric.
  • Added benchmarks/rust-baseline --benchmark, which runs smoke, medium,
    full, and huge scales in order for the selected engine/profile and then
    generates the HTML report.

Changed

  • Optimized Rust query result and row projection paths by sharing column
    metadata with Arc and improving fast projection decoding for point-lookups.
  • Updated the rust-baseline benchmark to measure reads from a checkpointed
    post-seed state for both engines: DecentDB uses Db::checkpoint_wal() and
    SQLite uses PRAGMA wal_checkpoint(TRUNCATE). The new
    checkpoint_after_seed step records duration plus WAL/database bytes before
    and after checkpointing.

This document outlines the strategy for improving DecentDB's performance metrics in comparison to SQLite. It includes baseline metrics, execution plans, and completion criteria to ensure that enhancements do not regress durability or correctness. The focus is on achieving competitive performance in key areas such as point lookup latency, range scans, joins, and aggregate operations while maintaining existing strengths in bulk insert throughput and other metrics.
…ecoding, and improve FaultyVfsFile write handling

- Changed QueryResult's columns from Vec<String> to Arc<[String]> for better memory efficiency.
- Added a new method `with_shared_columns` to create QueryResult with shared columns.
- Implemented `decode_projection_with_overflow` in Row to handle projections with overflow support.
- Enhanced `decode_value_with_overflow` to decode various value types with overflow handling.
- Added tests for row projection decoding to ensure correct materialization of requested columns.
- Introduced batched write handling in FaultyVfsFile to honor failpoints and improve error handling.
- Updated StatsVfsFile to track write statistics for batched writes.
- Added a method in WalIndex to check for dirty pages since demotion.
- Modified commit logic in WAL writer to conditionally demote cold versions based on dirty pages.
- Updated benchmark summary and metrics documentation to reflect recent performance improvements.
- Added a new command-line argument `--benchmark` to run all scales (smoke, medium, full, huge) in order.
- Introduced `BENCHMARK_SCALES` constant to define the order of benchmark scales.
- Refactored the `run` function to handle benchmark execution and reporting.
- Created `run_benchmark_suite` function to execute benchmarks for each scale and generate reports.
- Added helper functions for file size retrieval and WAL path generation.
- Updated the report generation logic to include additional metrics such as database and WAL sizes before and after checkpoints.
- Added new JSON result files for benchmark runs at different scales (smoke, medium, full, huge) with detailed step metrics.
@sphildreth sphildreth merged commit 004296d into main Jun 12, 2026
3 checks passed
@sphildreth sphildreth deleted the pk-lookup-profiled branch June 12, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant