Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple write benchmarks #70

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

Mike-Dax
Copy link
Contributor

@Mike-Dax Mike-Dax commented Dec 17, 2024

This PR adds some simple write benchmarks, comparing insert vs appender performance at batches of 1 and 1000.

(These numbers are taken on my M1 Macbook Pro)

 ✓ test/bench/write.bench.ts (4) 3999ms
   ✓ batch write of size 1 (2) 1283ms
     name                  hz     min     max    mean     p75     p99    p995    p999     rme  samples
   · 1 insert bind   4,440.54  0.1670  9.4687  0.2252  0.2373  0.3399  0.4004  1.2738  ±4.50%     2221
   · 1 row append   34,196.13  0.0257  1.6729  0.0292  0.0294  0.0408  0.0477  0.0725  ±0.98%    17099   fastest
   ✓ batch write of size 1000 (2) 2715ms
     name                    hz     min     max    mean     p75     p99    p995    p999      rme  samples
   · 1000 insert bind    7.4680  122.09  174.06  133.90  129.36  174.06  174.06  174.06  ±10.23%       10
   · 1000 row append   2,383.52  0.3978  0.7065  0.4195  0.4204  0.5430  0.5809  0.6203   ±0.35%     1192   fastest

@jraymakers
Copy link
Contributor

Thanks! Good confirmation that appending is significantly faster than insert+bind.

@jraymakers jraymakers merged commit 3f85023 into duckdb:main Dec 17, 2024
5 checks passed
@Mike-Dax Mike-Dax deleted the write-benchmark branch December 25, 2024 00:40
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.

2 participants