Add database indices to improve message delete performance.

This commit is contained in:
Greyson Parrelli
2023-05-03 09:59:47 -04:00
committed by GitHub
parent dd76909f02
commit 6aa4bb549a
6 changed files with 77 additions and 3 deletions

View File

@@ -126,9 +126,10 @@ public class ApplicationMigrations {
static final int REBUILD_MESSAGE_FTS_INDEX_3 = 81;
static final int TO_FROM_RECIPIENTS = 82;
static final int REBUILD_MESSAGE_FTS_INDEX_4 = 83;
static final int INDEX_DATABASE_MIGRATION = 84;
}
public static final int CURRENT_VERSION = 83;
public static final int CURRENT_VERSION = 84;
/**
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
@@ -562,6 +563,10 @@ public class ApplicationMigrations {
jobs.put(Version.REBUILD_MESSAGE_FTS_INDEX_4, new RebuildMessageSearchIndexMigrationJob());
}
if (lastSeenVersion < Version.INDEX_DATABASE_MIGRATION) {
jobs.put(Version.INDEX_DATABASE_MIGRATION, new DatabaseMigrationJob());
}
return jobs;
}