Skip to content

Benchmarking

sql-splitter includes a Docker-based benchmarking suite to compare performance against other SQL dump splitting tools.

ToolLanguageStarsNotes
sql-splitterRust-Multi-dialect, streaming I/O
mysqldbsplitPHP101Fastest competitor; selective extraction
mysqldump-splitterRust1Hierarchical output, gzip support
mysql-dump-splitterGo0Include/exclude tables
mysqldumpsplitGo~40Buffers in memory, has deadlock bug*
mysqldumpsplitterBash/awk540+Most popular shell-based tool
mysql_splitdumpBash/csplit93Uses GNU coreutils csplit
mysqldumpsplitNode.js55Requires Node 10 (gulp 3.x)
mysql-dump-splitRuby77Archived project
extract-mysql-dumpPython~5Multi-database extraction, Python 3.3+

*Original Go tool has a deadlock bug with non-interleaved dumps; benchmarks use a patched fork.

Benchmarks run inside Docker for reproducibility across different machines.

Terminal window
# Build the Docker image (first time only)
just docker-build
# Run benchmark with generated 100MB test file
just docker-bench
# Run with custom size (e.g., 200MB)
./docker/run-benchmark.sh --generate 200
FlagDescription
--generate SIZEGenerate test data of SIZE MB
--runs NNumber of benchmark runs (default: 3)
--warmup NWarmup runs before timing (default: 1)
--export FILEExport results to markdown file
--listShow installed tools
--testTest which tools work with file
Terminal window
# Generate 500MB test and run 5 iterations
./docker/run-benchmark.sh --generate 500 --runs 5
# Export results to markdown
./docker/run-benchmark.sh --generate 100 --export results.md
# List available tools
./docker/run-benchmark.sh --list
# Test which tools work with a specific file
./docker/run-benchmark.sh --test /data/dump.sql

Hardware: Apple M2 Max, 32GB RAM, Docker Desktop (linux/arm64)

ToolMeanσThroughputRelative
sql-splitter (Rust)64 ms±51605 MB/s1.00 (fastest)
mysqldbsplit (PHP)79 ms±31304 MB/s1.23x slower
mysqldumpsplit (Go)*193 ms±46536 MB/s3.00x slower
mysql-dump-splitter (Go/Bekkema)196 ms±53526 MB/s3.05x slower
mysql_splitdump (csplit)237 ms±16435 MB/s3.69x slower
mysqldump-splitter (Rust/Scoopit)271 ms±35381 MB/s4.21x slower
mysqldumpsplit (Node.js)427 ms±20242 MB/s6.64x slower
mysql-dump-split (Ruby)979 ms±16105 MB/s15.2x slower
mysqldumpsplitter (Bash)1027 ms±25100 MB/s16.0x slower
extract-mysql-dump (Python)1655 ms±12262 MB/s25.7x slower
ToolMeanσThroughputRelative
sql-splitter (Rust)0.42s±0.012453 MB/s1.00 (fastest)
mysqldbsplit (PHP)0.80s±0.101289 MB/s1.90x slower
mysql-dump-splitter (Go/Bekkema)0.94s±0.011097 MB/s2.24x slower
mysqldump-splitter (Rust/Scoopit)1.17s±0.02884 MB/s2.78x slower
mysqldumpsplit (Go)*1.50s±0.06691 MB/s3.55x slower
mysql_splitdump (csplit)2.43s±0.13425 MB/s5.77x slower
mysqldumpsplit (Node.js)2.91s±0.03356 MB/s6.89x slower
mysqldumpsplitter (Bash)9.37s±0.36110 MB/s22.2x slower
mysql-dump-split (Ruby)9.92s±0.63104 MB/s23.5x slower
extract-mysql-dump (Python)13.75s±0.1275 MB/s32.6x slower

5GB Stress Test (disk-backed /tmp, 3 runs)

Section titled “5GB Stress Test (disk-backed /tmp, 3 runs)”
ToolMeanσThroughputRelative
sql-splitter (Rust)10.8s±8.1480 MB/s1.00 (fastest)
mysql-dump-splitter (Go/Bekkema)12.1s±0.7427 MB/s1.12x slower
mysqldbsplit (PHP)12.8s±1.5404 MB/s1.19x slower
mysqldump-splitter (Rust/Scoopit)22.8s±9.3227 MB/s2.11x slower
mysqldumpsplit (Node.js)23.8s±5.1218 MB/s2.20x slower
mysqldumpsplit (Go)*35.6s±5.0146 MB/s3.29x slower
mysqldumpsplitter (Bash)49.8s±1.1104 MB/s4.60x slower
mysql-dump-split (Ruby)68.3s±1.376 MB/s6.32x slower
extract-mysql-dump (Python)90.6s±1.557 MB/s8.38x slower
mysql_splitdump (csplit)92.5s±15.856 MB/s8.55x slower

At 5GB the container’s disk write bandwidth dominates and compresses the margins — sql-splitter stays fastest, with the top three tools all effectively I/O-bound (~400–480 MB/s).

  • sql-splitter (Rust) is the fastest at every size — 1.6 GB/s on 100MB, 2.4 GB/s on 1GB — since the v1.14.1+ write-path rework (parallel pipelined writers) and allocation-lean parsing.
  • mysqldbsplit (PHP) is the fastest competitor at ~1.3 GB/s—surprisingly beating all other compiled tools on mysqldump format.
  • sql-splitter streams with bounded memory (~20–150 MB depending on command), independent of file size.
  • csplit is surprisingly fast for a shell tool, but relies on GNU coreutils (not available on stock macOS).
  • Node.js is ~7x slower but still reasonable for JS-based workflows.
  • Ruby/Bash/awk are 15-24x slower—fine for one-off use but not for automation.
  • Python (extract-mysql-dump) is the slowest at 26-33x slower, designed specifically for multi-database extraction scenarios.

All competitors only work with standard mysqldump format that includes comment markers like:

-- Table structure for table `users`

sql-splitter parses actual SQL statements (CREATE TABLE, INSERT INTO, COPY), so it works with:

  • TablePlus exports
  • DBeaver exports
  • pg_dump (PostgreSQL)
  • sqlite3 .dump
  • Any valid SQL file

Competitors produce 0 tables on non-mysqldump files.

ToolIssue
mysqldbsplit (PHP)Requires PHP CLI; mysqldump format only
mysqldump-splitter (Scoopit)Rust; mysqldump format only; hierarchical output structure
mysql-dump-splitter (Bekkema)Go; mysqldump format only
Go (afrase)Deadlocks on files where all INSERTs for one table come before the next table
Node.js (vekexasia)Requires Node 10 (gulp 3.x incompatible with Node 12+)
RubyProject archived, unmaintained
Bash/awkSlow, Unix-only
csplitRequires GNU coreutils
extract-mysql-dumpDesigned for multi-database dumps; no absolute paths; slowest of all tools
sql-splitterParses actual SQL rather than mysqldump comment markers, so it does strictly more work per byte
  1. Non-mysqldump formats (TablePlus, DBeaver, pg_dump, sqlite)
  2. Large files (>1GB) where memory matters
  3. CI/CD pipelines needing consistent behavior
  4. Multi-dialect projects (MySQL + PostgreSQL + SQLite + MSSQL)

The benchmark infrastructure lives in the docker/ directory:

FilePurpose
Dockerfile.benchmarkContainer with all tools installed
docker-compose.benchmark.ymlCompose configuration
run-benchmark.shEntry point script
benchmark-runner.shCore benchmarking logic
test-competitors.shTest tool compatibility