sql-splitter
High-performance CLI tool for splitting large SQL dump files into individual table files.
Supports MySQL, MariaDB, PostgreSQL (including COPY FROM stdin), and SQLite. Fastest streaming tool with 1.1-5x speedup over alternatives.
Installation
From crates.io
From source
Or download pre-built binaries from GitHub Releases.
Usage
# MySQL/MariaDB dump (default)
# PostgreSQL pg_dump
# SQLite dump
# Split specific tables only
# Analyze without splitting
Performance
| File Size | Time | Throughput |
|---|---|---|
| 100 MB | 142 ms | 726 MB/s |
| 1 GB | 1.32 s | 783 MB/s |
| 10 GB | 23.1 s | 445 MB/s |
See BENCHMARKS.md for detailed comparisons.
Options
sql-splitter split [OPTIONS] <FILE>
-o, --output <DIR> Output directory [default: output]
-d, --dialect <DIALECT> mysql, postgres, sqlite [default: mysql]
-t, --tables <LIST> Only split these tables (comma-separated)
-p, --progress Show progress bar
--dry-run Preview without writing files
License
This project is licensed under the MIT License. See LICENSE.md for details.