SQLite Forum

wal checkpointing very slow
I'm using sqlite in wal mode and when I run benchmarks on my program, I see that sqlite's autocheckpoints are by far the biggest bottleneck. The database is < 10MB and the wal file is 34MB.

When I disable autocheckpoints, I see that the wal size very quickly (within a few seconds) goes up and above 1 GB.

Why is the wal growing so fast but the database staying small? I don't delete data often and certainly not on a magnitude of gigabytes.

My program does many small insert transactions (it's not possible to batch them).