I run these commands on an sqlite database
sqlite3 data.db .dump > data.txt
cat data.txt | sqlite3 newdata.db
The file size of newdata.db is 10% larger than data.db (for a 100MB database with 400k entries). Why is that so?
data.db was created with sequential inserts & no deletes. Nothing complicated. I had set the following 2 PRAGMA while creating the tables but the dump file doesn't show them (probably they persist across connection only).
PRAGMA page_size = 4096;
PRAGMA cache_size = 72500;
Sample contents of data.txt.
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE urltable (url TEXT NOT NULL, PRIMARY KEY url);
INSERT INTO "urltable" VALUES('http://www.example.com/page1.html');
...
COMMIT;