mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
use combined index (state, hidden, chat_id) to speed up marknoticed_chat()
This commit is contained in:
@@ -1360,7 +1360,7 @@ CREATE INDEX devmsglabels_index1 ON devmsglabels (label);
|
||||
}
|
||||
if dbversion < 68 {
|
||||
info!(context, "[migration] v68");
|
||||
// the index is used to speed up get_fresh_msg_cnt(), see comment there for more details
|
||||
// the index is used to speed up get_fresh_msg_cnt() (see comment there for more details) and marknoticed_chat()
|
||||
sql.execute(
|
||||
"CREATE INDEX IF NOT EXISTS msgs_index7 ON msgs (state, hidden, chat_id);",
|
||||
paramsv![],
|
||||
|
||||
Reference in New Issue
Block a user