Skip to content

Commit

Permalink
Hotfix for log replay bug, fix type for constraints column (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamcx authored Nov 28, 2023
1 parent 4bbcb4f commit a3cc76d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/db/datastore/locking_tx_datastore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2746,7 +2746,7 @@ mod tests {

ColRow { table: 4, pos: 0, name: "constraint_id", ty: AlgebraicType::U32, autoinc: true },
ColRow { table: 4, pos: 1, name: "constraint_name", ty: AlgebraicType::String, autoinc: false },
ColRow { table: 4, pos: 2, name: "constraints", ty: AlgebraicType::U32, autoinc: false },
ColRow { table: 4, pos: 2, name: "constraints", ty: AlgebraicType::U8, autoinc: false },
ColRow { table: 4, pos: 3, name: "table_id", ty: AlgebraicType::U32, autoinc: false },
ColRow { table: 4, pos: 4, name: "columns", ty: AlgebraicType::array(AlgebraicType::U32), autoinc: false },

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/db/datastore/system_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ pub(crate) fn st_constraints_schema() -> TableSchema {
table_id: ST_CONSTRAINTS_ID,
col_id: StConstraintFields::Constraints.col_id(),
col_name: StConstraintFields::Constraints.col_name(),
col_type: AlgebraicType::U32,
col_type: AlgebraicType::U8,
is_autoinc: false,
},
ColumnSchema {
Expand Down

1 comment on commit a3cc76d

@github-actions
Copy link

@github-actions github-actions bot commented on a3cc76d Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark results

Benchmark Report

Legend:

  • load: number of rows pre-loaded into the database
  • count: number of rows touched by the transaction
  • index types:
    • unique: a single index on the id column
    • non_unique: no indexes
    • multi_index: non-unique index on every column
  • schemas:
    • person(id: u32, name: String, age: u64)
    • location(id: u32, x: u64, y: u64)

All throughputs are single-threaded.

Empty transaction

db on disk new latency old latency new throughput old throughput
sqlite 💿 436.7±2.45ns 437.7±2.92ns - -
sqlite 🧠 428.5±1.84ns 427.6±7.65ns - -
stdb_module 💿 18.9±1.60µs 16.9±0.38µs - -
stdb_module 🧠 17.7±0.81µs 17.5±0.96µs - -
stdb_raw 💿 913.8±1.30ns 911.9±1.28ns - -
stdb_raw 🧠 875.1±2.32ns 867.4±1.32ns - -

Single-row insertions

db on disk schema index type load new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 14.8±0.78µs 14.7±0.78µs 66.2 Ktx/sec 66.3 Ktx/sec
sqlite 💿 location multi_index 1000 15.8±0.12µs 15.7±0.16µs 61.7 Ktx/sec 62.1 Ktx/sec
sqlite 💿 location non_unique 0 7.1±0.02µs 7.2±0.31µs 136.8 Ktx/sec 134.7 Ktx/sec
sqlite 💿 location non_unique 1000 7.1±0.04µs 7.1±0.05µs 137.3 Ktx/sec 136.8 Ktx/sec
sqlite 💿 location unique 0 7.1±0.08µs 7.2±0.03µs 137.0 Ktx/sec 136.3 Ktx/sec
sqlite 💿 location unique 1000 7.1±0.04µs 7.1±0.03µs 137.2 Ktx/sec 136.8 Ktx/sec
sqlite 💿 person multi_index 0 14.5±1.01µs 14.3±0.04µs 67.2 Ktx/sec 68.2 Ktx/sec
sqlite 💿 person multi_index 1000 16.2±0.14µs 16.2±0.13µs 60.2 Ktx/sec 60.3 Ktx/sec
sqlite 💿 person non_unique 0 7.3±0.40µs 7.3±0.50µs 134.6 Ktx/sec 133.7 Ktx/sec
sqlite 💿 person non_unique 1000 7.3±0.04µs 7.3±0.04µs 133.9 Ktx/sec 133.9 Ktx/sec
sqlite 💿 person unique 0 7.2±0.06µs 7.3±0.03µs 135.5 Ktx/sec 134.3 Ktx/sec
sqlite 💿 person unique 1000 8.7±14.22µs 7.4±0.04µs 111.8 Ktx/sec 132.3 Ktx/sec
sqlite 🧠 location multi_index 0 4.0±0.01µs 3.9±0.01µs 246.5 Ktx/sec 247.4 Ktx/sec
sqlite 🧠 location multi_index 1000 5.1±0.03µs 5.1±0.04µs 190.1 Ktx/sec 191.1 Ktx/sec
sqlite 🧠 location non_unique 0 1844.1±4.72ns 1851.8±3.89ns 529.6 Ktx/sec 527.4 Ktx/sec
sqlite 🧠 location non_unique 1000 1878.9±9.51ns 1865.9±5.60ns 519.7 Ktx/sec 523.4 Ktx/sec
sqlite 🧠 location unique 0 1850.4±7.54ns 1831.2±4.72ns 527.8 Ktx/sec 533.3 Ktx/sec
sqlite 🧠 location unique 1000 1928.9±18.65ns 1925.1±13.93ns 506.3 Ktx/sec 507.3 Ktx/sec
sqlite 🧠 person multi_index 0 3.6±0.01µs 3.6±0.01µs 268.3 Ktx/sec 270.4 Ktx/sec
sqlite 🧠 person multi_index 1000 5.5±0.04µs 5.5±0.05µs 178.3 Ktx/sec 176.2 Ktx/sec
sqlite 🧠 person non_unique 0 1929.4±5.21ns 1930.0±4.67ns 506.1 Ktx/sec 506.0 Ktx/sec
sqlite 🧠 person non_unique 1000 1979.9±28.99ns 1999.3±13.01ns 493.2 Ktx/sec 488.5 Ktx/sec
sqlite 🧠 person unique 0 1920.7±105.23ns 1900.3±7.81ns 508.4 Ktx/sec 513.9 Ktx/sec
sqlite 🧠 person unique 1000 2.0±0.01µs 2.1±0.02µs 482.7 Ktx/sec 475.7 Ktx/sec
stdb_module 💿 location multi_index 0 53.1±6.65µs 52.4±4.95µs 18.4 Ktx/sec 18.6 Ktx/sec
stdb_module 💿 location multi_index 1000 282.4±10.31µs 312.5±18.00µs 3.5 Ktx/sec 3.1 Ktx/sec
stdb_module 💿 location non_unique 0 46.3±3.48µs 44.2±4.47µs 21.1 Ktx/sec 22.1 Ktx/sec
stdb_module 💿 location non_unique 1000 270.5±69.62µs 282.4±2.69µs 3.6 Ktx/sec 3.5 Ktx/sec
stdb_module 💿 location unique 0 47.2±4.73µs 46.8±4.88µs 20.7 Ktx/sec 20.9 Ktx/sec
stdb_module 💿 location unique 1000 145.4±4.53µs 268.1±65.17µs 6.7 Ktx/sec 3.6 Ktx/sec
stdb_module 💿 person multi_index 0 64.1±5.31µs 69.6±5.02µs 15.2 Ktx/sec 14.0 Ktx/sec
stdb_module 💿 person multi_index 1000 236.8±124.81µs 340.1±18.42µs 4.1 Ktx/sec 2.9 Ktx/sec
stdb_module 💿 person non_unique 0 46.0±5.64µs 46.2±4.64µs 21.2 Ktx/sec 21.1 Ktx/sec
stdb_module 💿 person non_unique 1000 322.1±26.90µs 331.7±22.79µs 3.0 Ktx/sec 2.9 Ktx/sec
stdb_module 💿 person unique 0 54.5±5.57µs 55.1±4.67µs 17.9 Ktx/sec 17.7 Ktx/sec
stdb_module 💿 person unique 1000 126.9±36.21µs 203.5±96.00µs 7.7 Ktx/sec 4.8 Ktx/sec
stdb_module 🧠 location multi_index 0 36.2±2.95µs 35.4±3.08µs 27.0 Ktx/sec 27.6 Ktx/sec
stdb_module 🧠 location multi_index 1000 215.6±56.83µs 219.3±12.60µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_module 🧠 location non_unique 0 32.9±3.76µs 29.7±2.19µs 29.7 Ktx/sec 32.8 Ktx/sec
stdb_module 🧠 location non_unique 1000 243.0±9.57µs 177.8±30.10µs 4.0 Ktx/sec 5.5 Ktx/sec
stdb_module 🧠 location unique 0 34.3±3.41µs 33.3±2.64µs 28.5 Ktx/sec 29.4 Ktx/sec
stdb_module 🧠 location unique 1000 269.9±16.49µs 190.6±5.27µs 3.6 Ktx/sec 5.1 Ktx/sec
stdb_module 🧠 person multi_index 0 43.5±4.50µs 46.1±5.16µs 22.5 Ktx/sec 21.2 Ktx/sec
stdb_module 🧠 person multi_index 1000 240.8±4.92µs 135.4±12.11µs 4.1 Ktx/sec 7.2 Ktx/sec
stdb_module 🧠 person non_unique 0 30.5±2.42µs 33.3±2.69µs 32.0 Ktx/sec 29.4 Ktx/sec
stdb_module 🧠 person non_unique 1000 138.0±15.28µs 240.7±6.38µs 7.1 Ktx/sec 4.1 Ktx/sec
stdb_module 🧠 person unique 0 37.7±4.06µs 39.9±3.55µs 25.9 Ktx/sec 24.5 Ktx/sec
stdb_module 🧠 person unique 1000 112.5±11.83µs 208.1±1.90µs 8.7 Ktx/sec 4.7 Ktx/sec
stdb_raw 💿 location multi_index 0 6.9±0.01µs 6.9±0.04µs 141.0 Ktx/sec 141.6 Ktx/sec
stdb_raw 💿 location multi_index 1000 34.4±249.51µs 29.0±195.75µs 28.4 Ktx/sec 33.6 Ktx/sec
stdb_raw 💿 location non_unique 0 4.5±0.02µs 4.5±0.01µs 216.4 Ktx/sec 215.7 Ktx/sec
stdb_raw 💿 location non_unique 1000 5.9±0.16µs 6.0±0.18µs 166.6 Ktx/sec 163.9 Ktx/sec
stdb_raw 💿 location unique 0 5.8±0.02µs 5.8±0.01µs 167.9 Ktx/sec 168.1 Ktx/sec
stdb_raw 💿 location unique 1000 25.5±175.38µs 26.0±179.31µs 38.3 Ktx/sec 37.6 Ktx/sec
stdb_raw 💿 person multi_index 0 11.3±1.04µs 11.1±0.03µs 86.6 Ktx/sec 87.7 Ktx/sec
stdb_raw 💿 person multi_index 1000 56.3±419.47µs 14.4±0.20µs 17.4 Ktx/sec 67.8 Ktx/sec
stdb_raw 💿 person non_unique 0 5.6±0.03µs 5.6±0.03µs 173.1 Ktx/sec 174.2 Ktx/sec
stdb_raw 💿 person non_unique 1000 19.2±120.57µs 7.4±0.20µs 50.8 Ktx/sec 132.1 Ktx/sec
stdb_raw 💿 person unique 0 8.1±0.38µs 8.0±0.05µs 121.1 Ktx/sec 121.3 Ktx/sec
stdb_raw 💿 person unique 1000 10.5±0.19µs 38.4±277.93µs 93.0 Ktx/sec 25.4 Ktx/sec
stdb_raw 🧠 location multi_index 0 4.3±0.01µs 4.3±0.01µs 226.8 Ktx/sec 225.3 Ktx/sec
stdb_raw 🧠 location multi_index 1000 5.8±0.03µs 5.9±0.05µs 168.1 Ktx/sec 165.2 Ktx/sec
stdb_raw 🧠 location non_unique 0 2.1±0.00µs 2.1±0.00µs 467.4 Ktx/sec 464.6 Ktx/sec
stdb_raw 🧠 location non_unique 1000 2.6±0.02µs 2.6±0.02µs 379.6 Ktx/sec 373.6 Ktx/sec
stdb_raw 🧠 location unique 0 3.3±0.00µs 3.3±0.03µs 295.5 Ktx/sec 294.3 Ktx/sec
stdb_raw 🧠 location unique 1000 4.4±0.04µs 4.6±0.03µs 221.8 Ktx/sec 213.5 Ktx/sec
stdb_raw 🧠 person multi_index 0 8.0±0.01µs 8.1±0.01µs 122.0 Ktx/sec 120.8 Ktx/sec
stdb_raw 🧠 person multi_index 1000 10.1±0.07µs 10.2±0.05µs 96.8 Ktx/sec 95.6 Ktx/sec
stdb_raw 🧠 person non_unique 0 2.7±0.01µs 2.7±0.00µs 368.0 Ktx/sec 366.8 Ktx/sec
stdb_raw 🧠 person non_unique 1000 3.2±0.02µs 3.4±0.05µs 304.6 Ktx/sec 287.8 Ktx/sec
stdb_raw 🧠 person unique 0 4.9±0.02µs 5.0±0.01µs 199.2 Ktx/sec 196.4 Ktx/sec
stdb_raw 🧠 person unique 1000 6.3±0.06µs 6.5±0.03µs 155.2 Ktx/sec 149.2 Ktx/sec

Multi-row insertions

db on disk schema index type load count new latency old latency new throughput old throughput
sqlite 💿 location multi_index 0 100 132.5±6.13µs 130.8±5.51µs 7.4 Ktx/sec 7.5 Ktx/sec
sqlite 💿 location multi_index 1000 100 204.6±1.04µs 205.1±27.42µs 4.8 Ktx/sec 4.8 Ktx/sec
sqlite 💿 location non_unique 0 100 50.9±1.66µs 50.0±1.88µs 19.2 Ktx/sec 19.5 Ktx/sec
sqlite 💿 location non_unique 1000 100 52.8±0.30µs 53.0±0.29µs 18.5 Ktx/sec 18.4 Ktx/sec
sqlite 💿 location unique 0 100 52.6±2.06µs 51.7±1.87µs 18.6 Ktx/sec 18.9 Ktx/sec
sqlite 💿 location unique 1000 100 56.8±0.35µs 55.8±0.35µs 17.2 Ktx/sec 17.5 Ktx/sec
sqlite 💿 person multi_index 0 100 120.7±5.62µs 118.2±0.89µs 8.1 Ktx/sec 8.3 Ktx/sec
sqlite 💿 person multi_index 1000 100 240.8±40.17µs 233.5±2.52µs 4.1 Ktx/sec 4.2 Ktx/sec
sqlite 💿 person non_unique 0 100 48.7±1.60µs 48.5±0.90µs 20.0 Ktx/sec 20.1 Ktx/sec
sqlite 💿 person non_unique 1000 100 61.3±0.40µs 60.2±0.28µs 15.9 Ktx/sec 16.2 Ktx/sec
sqlite 💿 person unique 0 100 51.7±1.33µs 49.7±3.19µs 18.9 Ktx/sec 19.6 Ktx/sec
sqlite 💿 person unique 1000 100 56.8±0.34µs 55.6±0.29µs 17.2 Ktx/sec 17.6 Ktx/sec
sqlite 🧠 location multi_index 0 100 119.5±0.45µs 118.5±0.29µs 8.2 Ktx/sec 8.2 Ktx/sec
sqlite 🧠 location multi_index 1000 100 172.2±0.44µs 170.4±0.30µs 5.7 Ktx/sec 5.7 Ktx/sec
sqlite 🧠 location non_unique 0 100 44.6±0.31µs 44.0±0.20µs 21.9 Ktx/sec 22.2 Ktx/sec
sqlite 🧠 location non_unique 1000 100 45.3±0.46µs 45.4±0.55µs 21.6 Ktx/sec 21.5 Ktx/sec
sqlite 🧠 location unique 0 100 46.5±0.42µs 45.0±0.32µs 21.0 Ktx/sec 21.7 Ktx/sec
sqlite 🧠 location unique 1000 100 49.3±0.23µs 49.2±0.22µs 19.8 Ktx/sec 19.9 Ktx/sec
sqlite 🧠 person multi_index 0 100 108.8±0.60µs 107.1±0.48µs 9.0 Ktx/sec 9.1 Ktx/sec
sqlite 🧠 person multi_index 1000 100 193.1±0.27µs 190.9±0.35µs 5.1 Ktx/sec 5.1 Ktx/sec
sqlite 🧠 person non_unique 0 100 43.6±0.35µs 42.7±0.53µs 22.4 Ktx/sec 22.9 Ktx/sec
sqlite 🧠 person non_unique 1000 100 46.4±0.23µs 46.7±0.55µs 21.1 Ktx/sec 20.9 Ktx/sec
sqlite 🧠 person unique 0 100 45.3±0.28µs 44.1±0.21µs 21.5 Ktx/sec 22.1 Ktx/sec
sqlite 🧠 person unique 1000 100 49.3±0.23µs 48.8±0.30µs 19.8 Ktx/sec 20.0 Ktx/sec
stdb_module 💿 location multi_index 0 100 653.9±134.44µs 551.0±0.85µs 1529 tx/sec 1814 tx/sec
stdb_module 💿 location multi_index 1000 100 824.5±83.44µs 1017.6±90.36µs 1212 tx/sec 982 tx/sec
stdb_module 💿 location non_unique 0 100 469.4±21.78µs 467.0±13.81µs 2.1 Ktx/sec 2.1 Ktx/sec
stdb_module 💿 location non_unique 1000 100 455.5±10.39µs 670.9±18.59µs 2.1 Ktx/sec 1490 tx/sec
stdb_module 💿 location unique 0 100 628.8±83.02µs 577.2±65.30µs 1590 tx/sec 1732 tx/sec
stdb_module 💿 location unique 1000 100 891.3±61.50µs 744.2±51.52µs 1121 tx/sec 1343 tx/sec
stdb_module 💿 person multi_index 0 100 1106.7±133.07µs 989.8±231.67µs 903 tx/sec 1010 tx/sec
stdb_module 💿 person multi_index 1000 100 1182.8±150.92µs 1068.9±43.63µs 845 tx/sec 935 tx/sec
stdb_module 💿 person non_unique 0 100 614.2±100.33µs 763.0±9.02µs 1628 tx/sec 1310 tx/sec
stdb_module 💿 person non_unique 1000 100 495.1±14.82µs 934.5±133.55µs 2019 tx/sec 1070 tx/sec
stdb_module 💿 person unique 0 100 776.4±61.17µs 763.4±1.32µs 1288 tx/sec 1309 tx/sec
stdb_module 💿 person unique 1000 100 1027.7±47.28µs 1037.4±60.15µs 973 tx/sec 963 tx/sec
stdb_module 🧠 location multi_index 0 100 561.0±105.58µs 624.6±117.49µs 1782 tx/sec 1600 tx/sec
stdb_module 🧠 location multi_index 1000 100 651.8±20.65µs 742.7±63.27µs 1534 tx/sec 1346 tx/sec
stdb_module 🧠 location non_unique 0 100 282.8±25.13µs 376.2±10.42µs 3.5 Ktx/sec 2.6 Ktx/sec
stdb_module 🧠 location non_unique 1000 100 359.3±26.98µs 454.3±18.03µs 2.7 Ktx/sec 2.1 Ktx/sec
stdb_module 🧠 location unique 0 100 488.1±99.39µs 495.7±83.51µs 2.0 Ktx/sec 2017 tx/sec
stdb_module 🧠 location unique 1000 100 650.6±10.89µs 637.9±65.40µs 1537 tx/sec 1567 tx/sec
stdb_module 🧠 person multi_index 0 100 843.6±64.91µs 950.6±31.71µs 1185 tx/sec 1051 tx/sec
stdb_module 🧠 person multi_index 1000 100 980.8±4.50µs 978.3±10.21µs 1019 tx/sec 1022 tx/sec
stdb_module 🧠 person non_unique 0 100 399.4±18.52µs 467.3±72.50µs 2.4 Ktx/sec 2.1 Ktx/sec
stdb_module 🧠 person non_unique 1000 100 641.2±70.58µs 474.8±69.55µs 1559 tx/sec 2.1 Ktx/sec
stdb_module 🧠 person unique 0 100 582.6±2.98µs 599.7±4.53µs 1716 tx/sec 1667 tx/sec
stdb_module 🧠 person unique 1000 100 769.3±10.00µs 665.7±4.05µs 1299 tx/sec 1502 tx/sec
stdb_raw 💿 location multi_index 0 100 345.2±9.97µs 342.6±0.53µs 2.8 Ktx/sec 2.9 Ktx/sec
stdb_raw 💿 location multi_index 1000 100 369.8±1.22µs 367.4±1.49µs 2.6 Ktx/sec 2.7 Ktx/sec
stdb_raw 💿 location non_unique 0 100 117.7±18.79µs 119.5±0.23µs 8.3 Ktx/sec 8.2 Ktx/sec
stdb_raw 💿 location non_unique 1000 100 117.7±0.96µs 121.3±0.95µs 8.3 Ktx/sec 8.0 Ktx/sec
stdb_raw 💿 location unique 0 100 243.8±0.98µs 241.8±0.28µs 4.0 Ktx/sec 4.0 Ktx/sec
stdb_raw 💿 location unique 1000 100 261.6±1.38µs 261.4±1.30µs 3.7 Ktx/sec 3.7 Ktx/sec
stdb_raw 💿 person multi_index 0 100 714.1±11.90µs 712.1±2.27µs 1400 tx/sec 1404 tx/sec
stdb_raw 💿 person multi_index 1000 100 743.3±2.97µs 791.1±487.72µs 1345 tx/sec 1264 tx/sec
stdb_raw 💿 person non_unique 0 100 218.5±5.54µs 223.3±0.89µs 4.5 Ktx/sec 4.4 Ktx/sec
stdb_raw 💿 person non_unique 1000 100 221.1±0.34µs 225.7±0.31µs 4.4 Ktx/sec 4.3 Ktx/sec
stdb_raw 💿 person unique 0 100 428.6±0.38µs 430.3±0.55µs 2.3 Ktx/sec 2.3 Ktx/sec
stdb_raw 💿 person unique 1000 100 447.9±1.39µs 449.8±1.43µs 2.2 Ktx/sec 2.2 Ktx/sec
stdb_raw 🧠 location multi_index 0 100 298.2±0.43µs 298.3±0.58µs 3.3 Ktx/sec 3.3 Ktx/sec
stdb_raw 🧠 location multi_index 1000 100 323.0±0.52µs 325.5±0.51µs 3.0 Ktx/sec 3.0 Ktx/sec
stdb_raw 🧠 location non_unique 0 100 73.9±0.11µs 77.4±0.24µs 13.2 Ktx/sec 12.6 Ktx/sec
stdb_raw 🧠 location non_unique 1000 100 74.9±0.22µs 78.4±0.17µs 13.0 Ktx/sec 12.5 Ktx/sec
stdb_raw 🧠 location unique 0 100 200.0±0.32µs 198.9±0.24µs 4.9 Ktx/sec 4.9 Ktx/sec
stdb_raw 🧠 location unique 1000 100 219.1±0.78µs 217.4±0.20µs 4.5 Ktx/sec 4.5 Ktx/sec
stdb_raw 🧠 person multi_index 0 100 621.7±2.64µs 623.0±0.53µs 1608 tx/sec 1605 tx/sec
stdb_raw 🧠 person multi_index 1000 100 649.7±0.71µs 651.7±0.53µs 1539 tx/sec 1534 tx/sec
stdb_raw 🧠 person non_unique 0 100 127.5±0.10µs 132.8±0.24µs 7.7 Ktx/sec 7.4 Ktx/sec
stdb_raw 🧠 person non_unique 1000 100 129.8±0.29µs 134.9±0.16µs 7.5 Ktx/sec 7.2 Ktx/sec
stdb_raw 🧠 person unique 0 100 336.6±0.37µs 338.9±0.22µs 2.9 Ktx/sec 2.9 Ktx/sec
stdb_raw 🧠 person unique 1000 100 357.4±0.58µs 357.9±0.62µs 2.7 Ktx/sec 2.7 Ktx/sec

Full table iterate

db on disk schema index type new latency old latency new throughput old throughput
sqlite 💿 location unique 9.2±0.06µs 9.3±0.10µs 106.0 Ktx/sec 105.4 Ktx/sec
sqlite 💿 person unique 9.7±0.14µs 10.1±0.08µs 100.8 Ktx/sec 96.8 Ktx/sec
sqlite 🧠 location unique 8.1±0.06µs 8.0±0.09µs 121.3 Ktx/sec 121.6 Ktx/sec
sqlite 🧠 person unique 8.6±0.08µs 8.6±0.06µs 114.0 Ktx/sec 113.8 Ktx/sec
stdb_module 💿 location unique 47.8±6.36µs 48.1±4.96µs 20.4 Ktx/sec 20.3 Ktx/sec
stdb_module 💿 person unique 60.7±6.55µs 56.6±9.08µs 16.1 Ktx/sec 17.3 Ktx/sec
stdb_module 🧠 location unique 46.4±5.41µs 45.0±4.53µs 21.1 Ktx/sec 21.7 Ktx/sec
stdb_module 🧠 person unique 51.7±10.99µs 52.0±10.38µs 18.9 Ktx/sec 18.8 Ktx/sec
stdb_raw 💿 location unique 9.2±0.01µs 9.3±0.57µs 105.6 Ktx/sec 104.6 Ktx/sec
stdb_raw 💿 person unique 9.2±0.01µs 9.2±0.00µs 105.6 Ktx/sec 106.5 Ktx/sec
stdb_raw 🧠 location unique 9.2±0.02µs 9.1±0.02µs 106.1 Ktx/sec 107.1 Ktx/sec
stdb_raw 🧠 person unique 9.2±0.01µs 9.1±0.10µs 106.2 Ktx/sec 106.9 Ktx/sec

Find unique key

db on disk key type load new latency old latency new throughput old throughput
sqlite 💿 u32 1000 2.3±0.02µs 2.4±0.01µs 424.5 Ktx/sec 415.0 Ktx/sec
sqlite 🧠 u32 1000 1130.3±5.67ns 1124.4±8.81ns 864.0 Ktx/sec 868.5 Ktx/sec
stdb_module 💿 u32 1000 23.2±1.36µs 25.4±1.79µs 42.2 Ktx/sec 38.5 Ktx/sec
stdb_module 🧠 u32 1000 23.7±1.77µs 23.8±1.94µs 41.2 Ktx/sec 41.1 Ktx/sec
stdb_raw 💿 u32 1000 2.1±0.02µs 2.1±0.00µs 458.9 Ktx/sec 455.0 Ktx/sec
stdb_raw 🧠 u32 1000 2.1±0.00µs 2.1±0.00µs 473.0 Ktx/sec 467.8 Ktx/sec

Filter

db on disk key type index strategy load count new latency old latency new throughput old throughput
sqlite 💿 string indexed 1000 10 5.6±0.01µs 5.6±0.05µs 174.4 Ktx/sec 173.2 Ktx/sec
sqlite 💿 string non_indexed 1000 10 53.7±0.30µs 52.8±1.27µs 18.2 Ktx/sec 18.5 Ktx/sec
sqlite 💿 u64 indexed 1000 10 5.3±0.02µs 5.5±0.02µs 182.7 Ktx/sec 179.1 Ktx/sec
sqlite 💿 u64 non_indexed 1000 10 33.7±0.72µs 33.5±0.38µs 29.0 Ktx/sec 29.1 Ktx/sec
sqlite 🧠 string indexed 1000 10 4.2±0.02µs 4.2±0.01µs 232.1 Ktx/sec 230.8 Ktx/sec
sqlite 🧠 string non_indexed 1000 10 52.3±0.35µs 49.8±0.10µs 18.7 Ktx/sec 19.6 Ktx/sec
sqlite 🧠 u64 indexed 1000 10 4.0±0.01µs 4.0±0.02µs 242.6 Ktx/sec 243.1 Ktx/sec
sqlite 🧠 u64 non_indexed 1000 10 32.3±0.34µs 32.2±0.36µs 30.3 Ktx/sec 30.4 Ktx/sec
stdb_module 💿 string indexed 1000 10 35.9±2.30µs 35.2±2.55µs 27.2 Ktx/sec 27.8 Ktx/sec
stdb_module 💿 string non_indexed 1000 10 174.2±6.25µs 167.4±1.34µs 5.6 Ktx/sec 5.8 Ktx/sec
stdb_module 💿 u64 indexed 1000 10 31.4±2.65µs 32.4±2.40µs 31.1 Ktx/sec 30.1 Ktx/sec
stdb_module 💿 u64 non_indexed 1000 10 139.6±3.09µs 139.4±1.04µs 7.0 Ktx/sec 7.0 Ktx/sec
stdb_module 🧠 string indexed 1000 10 35.1±2.01µs 35.7±2.28µs 27.8 Ktx/sec 27.3 Ktx/sec
stdb_module 🧠 string non_indexed 1000 10 165.3±0.93µs 161.6±1.27µs 5.9 Ktx/sec 6.0 Ktx/sec
stdb_module 🧠 u64 indexed 1000 10 31.2±2.79µs 31.4±3.03µs 31.3 Ktx/sec 31.1 Ktx/sec
stdb_module 🧠 u64 non_indexed 1000 10 140.4±3.49µs 135.3±5.20µs 7.0 Ktx/sec 7.2 Ktx/sec
stdb_raw 💿 string indexed 1000 10 4.5±0.01µs 4.5±0.01µs 216.0 Ktx/sec 215.8 Ktx/sec
stdb_raw 💿 string non_indexed 1000 10 137.1±0.20µs 135.5±0.21µs 7.1 Ktx/sec 7.2 Ktx/sec
stdb_raw 💿 u64 indexed 1000 10 4.4±0.01µs 4.4±0.01µs 221.4 Ktx/sec 219.9 Ktx/sec
stdb_raw 💿 u64 non_indexed 1000 10 114.5±0.33µs 114.1±0.58µs 8.5 Ktx/sec 8.6 Ktx/sec
stdb_raw 🧠 string indexed 1000 10 4.5±0.04µs 4.5±0.01µs 219.0 Ktx/sec 218.8 Ktx/sec
stdb_raw 🧠 string non_indexed 1000 10 132.9±0.43µs 132.7±0.50µs 7.3 Ktx/sec 7.4 Ktx/sec
stdb_raw 🧠 u64 indexed 1000 10 4.4±0.01µs 4.4±0.01µs 224.3 Ktx/sec 223.7 Ktx/sec
stdb_raw 🧠 u64 non_indexed 1000 10 113.8±0.42µs 113.9±1.55µs 8.6 Ktx/sec 8.6 Ktx/sec

Serialize

schema format count new latency old latency new throughput old throughput
location bsatn 100 1731.9±33.26ns 1680.4±29.22ns 55.1 Mtx/sec 56.8 Mtx/sec
location json 100 3.7±0.02µs 3.3±0.07µs 26.0 Mtx/sec 28.8 Mtx/sec
location product_value 100 574.0±0.70ns 571.8±1.41ns 166.1 Mtx/sec 166.8 Mtx/sec
person bsatn 100 2.9±0.02µs 2.9±0.04µs 33.0 Mtx/sec 33.3 Mtx/sec
person json 100 5.0±0.02µs 4.8±0.03µs 19.0 Mtx/sec 19.7 Mtx/sec
person product_value 100 1009.3±1.99ns 1006.1±3.63ns 94.5 Mtx/sec 94.8 Mtx/sec

Module: invoke with large arguments

arg size new latency old latency new throughput old throughput
64KiB 70.7±9.70µs 67.1±10.28µs - -

Module: print bulk

line count new latency old latency new throughput old throughput
1 22.8±1.09µs 23.8±1.97µs - -
100 194.9±12.59µs 191.6±1.20µs - -
1000 1729.1±14.46µs 1802.0±492.88µs - -

Remaining benchmarks

name new latency old latency new throughput old throughput

Please sign in to comment.