]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Msgmap.pm
msgmap: use TRUNCATE for journal_mode, for now
[public-inbox.git] / lib / PublicInbox / Msgmap.pm
index 9523752e9af07f8b973ac45d5a5aeda408801513..5fe14383ac484a79e1b279b718e28db68b5449d4 100644 (file)
@@ -48,6 +48,10 @@ sub new_file {
 
        if ($writable) {
                create_tables($dbh);
+
+               # TRUNCATE reduces I/O compared to the default (DELETE)
+               $dbh->do('PRAGMA journal_mode = TRUNCATE');
+
                $dbh->begin_work;
                $self->created_at(time) unless $self->created_at;