Skip to content

Commit 2854f87

Browse files
committed
fix: CREATE INDEX imap_only_rfc724_mid ON imap(rfc724_mid) (#7490)
This effectively readds the old `imap_rfc724_mid` built only on `rfc724_mid`, otherwise `sql::prune_tombstones()` which is called from `housekeeping()` becomes very slow because of no suitable index.
1 parent 145a581 commit 2854f87

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sql/migrations.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,15 @@ CREATE INDEX imap_sync_index ON imap_sync(transport_id, folder);
14451445
.await?;
14461446
}
14471447

1448+
inc_and_check(&mut migration_version, 141)?;
1449+
if dbversion < migration_version {
1450+
sql.execute_migration(
1451+
"CREATE INDEX imap_only_rfc724_mid ON imap(rfc724_mid)",
1452+
migration_version,
1453+
)
1454+
.await?;
1455+
}
1456+
14481457
let new_version = sql
14491458
.get_raw_config_int(VERSION_CFG)
14501459
.await?

0 commit comments

Comments
 (0)