📋 COPY Bulk Insert Benchmark
100 million rows • 10,000 rows per COPY • 10,000 COPY operations
| Driver | Implementation | Rows/Second | Time (100M) | vs asyncpg |
|---|---|---|---|---|
| Native Rust qail-pg | 1,363,776 🏆 | 73.3s | +28% | |
| qail-py | 1,214,141 🥈 | 82.4s | +14% | |
| asyncpg | 1,062,942 | 94.1s | baseline |
🎉 Production-Scale Results!
At 100M rows, PostgreSQL becomes I/O bound. These are real-world bulk insert speeds.
📊 Summary: QAIL Wins Every Benchmark
+28%
COPY (100M rows)
2.24x
Sequential queries
24x
Pipelined queries
| Benchmark | Native Rust | qail-py | asyncpg | Winner |
|---|---|---|---|---|
| COPY Bulk Insert (100M) | 1.36M r/s 🏆 | 1.21M r/s | 1.06M r/s | Rust 🥇 |
| Sequential Queries | 38.9k q/s | 27.7k q/s | 17.4k q/s | Rust 🥇 |
| Pipelined Queries | 384.6k q/s | 122.4k q/s | ~16k q/s | Rust 🥇 |
🔬 Test Environment
Hardware:
- Apple M3 Pro
- macOS (arm64)
- localhost PostgreSQL
Software:
- PostgreSQL 18
- Python 3.13.7
- Rust stable
Test Config:
- Single connection
- No pooling
- Prepared statements
Try QAIL Today
The fastest PostgreSQL driver for Python and Rust.
Star on GitHub