aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/database.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-03-20 15:40:44 -0600
committerMarvin W <git@larma.de>2023-03-21 17:35:58 -0600
commit4e1311dfa9944fc04089037783db6a0a6eef7345 (patch)
tree66cdb426fe90e9582deb22871c0cd4773d863bd0 /libdino/src/service/database.vala
parent3721027edb2d2f6f71cf655d643f7796864cfdbc (diff)
downloaddino-4e1311dfa9944fc04089037783db6a0a6eef7345.tar.gz
dino-4e1311dfa9944fc04089037783db6a0a6eef7345.zip
Improve database performance while reconnecting and syncing
Also move some tasks to low priority idle queue so they won't block UI updates
Diffstat (limited to 'libdino/src/service/database.vala')
-rw-r--r--libdino/src/service/database.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index 96b3b82d..6b3f5e6a 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -7,7 +7,7 @@ using Dino.Entities;
namespace Dino {
public class Database : Qlite.Database {
- private const int VERSION = 25;
+ private const int VERSION = 26;
public class AccountTable : Table {
public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true };
@@ -93,6 +93,11 @@ public class Database : Qlite.Database {
// deduplication
index("message_account_counterpart_stanzaid_idx", {account_id, counterpart_id, stanza_id});
+ index("message_account_counterpart_serverid_idx", {account_id, counterpart_id, server_id});
+
+ // message by marked
+ index("message_account_marked_idx", {account_id, marked});
+
fts({body});
}
}