Nikolaus Rath <nikol...@rath.org> writes: [ WAL Performance ] > Really no one an idea of why this is happening?
I tried to investigate this further myself and created a small example program (attached). It fills a table with 500,000 entries without using explicit transactions. The final db is 24 MB big. On my system, the required times are (the xxx in WAL(xxx) is the wal_autocheckpoint value): synchronous=OFF, journal_mode=OFF: 13143.2 ms synchronous=OFF, journal_mode=WAL(1000): 12130.1 ms synchronous=NORMAL, journal_mode=WAL(1000): 68430.8 ms synchronous=OFF, journal_mode=WAL(10000): 12279.0 ms synchronous=NORMAL, journal_mode=WAL(10000): 33475.0 ms synchronous=OFF, journal_mode=WAL(50000): 13058.9 ms synchronous=NORMAL, journal_mode=WAL(50000): 27820.7 ms Unfortunately these results just deepen my confusion: - Why is WAL faster than no journal if sync=OFF? Doesn't WAL require every page to be written twice? - Why is WAL(50000) so much slower than no journal with sync=NORM? If the WAL file can grow up to 50MB, but the db is only 25MB big, it seems to me that only one checkpoint (and therefore only one fsync()) should be required. Am I missing something again? Any explanations would be very much appreciated. Thanks, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
_______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users