aboutsummaryrefslogtreecommitdiffstats
path: root/install/schema_mysql.sql
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-09-01 21:27:59 +0200
committerMario Vavti <mario@mariovavti.com>2017-09-01 21:27:59 +0200
commite935473c5c05a40194c110fbb024825a30ca5a4b (patch)
tree0795a3d546c8294d2f14a64e2d3e206cbe4b8e05 /install/schema_mysql.sql
parent3af3b36db3ef1ab0f8b5987a13d9adca482d0952 (diff)
downloadvolse-hubzilla-e935473c5c05a40194c110fbb024825a30ca5a4b.tar.gz
volse-hubzilla-e935473c5c05a40194c110fbb024825a30ca5a4b.tar.bz2
volse-hubzilla-e935473c5c05a40194c110fbb024825a30ca5a4b.zip
add combined index for item.uid and item.item_unseen. this speeds up notifications by a magnitude.
Diffstat (limited to 'install/schema_mysql.sql')
-rw-r--r--install/schema_mysql.sql5
1 files changed, 3 insertions, 2 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 9e2e401b5..a9950ce21 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -650,8 +650,9 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `created` (`created`),
KEY `edited` (`edited`),
KEY `received` (`received`),
- KEY `uid_commented` (`uid`,`commented`),
- KEY `uid_created` (`uid`,`created`),
+ KEY `uid_commented` (`uid`, `commented`),
+ KEY `uid_created` (`uid`, `created`),
+ KEY `uid_item_unseen` (`uid`, `item_unseen`);
KEY `aid` (`aid`),
KEY `owner_xchan` (`owner_xchan`),
KEY `author_xchan` (`author_xchan`),