lib/PublicInbox/Msgmap.pm | 4 ++++ diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index 9523752e9af07f8b973ac45d5a5aeda408801513..5fe14383ac484a79e1b279b718e28db68b5449d4 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -48,6 +48,10 @@ my $self = bless { dbh => $dbh }, $class; 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;