Skip to content

perf: reuse SQLite prepared statements in TPCC#360

Merged
KKould merged 1 commit into
mainfrom
perf/sqlite-prepared-statements
Jun 21, 2026
Merged

perf: reuse SQLite prepared statements in TPCC#360
KKould merged 1 commit into
mainfrom
perf/sqlite-prepared-statements

Conversation

@KKould

@KKould KKould commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Change the TPCC backend traits to carry backend-specific prepared statement types through the benchmark loop.
  • Make the SQLite TPCC backend prepare statements once in prepare_statements and reuse them for repeated transaction execution.
  • Update TPCC benchmark docs with the new full 720s SQLite results.

TPCC Results

Run with the default TPCC duration, --num-ware 1, default --max-retry 5.

Backend TpmC New-Order p90 Payment p90 Order-Status p90 Delivery p90 Stock-Level p90
SQLite balanced 56788 0.001s 0.001s 0.001s 0.001s 0.001s
SQLite practical 44049 0.001s 0.001s 0.001s 0.001s 0.001s

Compared with the previous README results:

Backend Previous TpmC New TpmC Change
SQLite balanced 39835 56788 +42.6%
SQLite practical 37911 44049 +16.2%

Raw logs were generated under tpcc/results/2026-06-21_09-00-53-sqlite-prepared/.

Tests

  • cargo fmt --check
  • cargo check -p tpcc
  • cargo test -p tpcc
  • cargo run -p tpcc -- --backend sqlite --sqlite-profile balanced --measure-time 1 --num-ware 1 --path target/tpcc-smoke-sqlite
  • cargo run -p tpcc -- --backend dual --measure-time 1 --num-ware 1 --path target/tpcc-smoke-dual
  • target/release/tpcc --backend sqlite --sqlite-profile balanced --num-ware 1 --path target/tpcc-sqlite-prepared/sqlite-balanced.sqlite
  • target/release/tpcc --backend sqlite --sqlite-profile practical --num-ware 1 --path target/tpcc-sqlite-prepared/sqlite-practical.sqlite
  • git diff --cached --check

@KKould KKould merged commit a679485 into main Jun 21, 2026
7 checks passed
@KKould KKould deleted the perf/sqlite-prepared-statements branch June 21, 2026 07:36
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