summaryrefslogtreecommitdiff
path: root/util/sql/schema.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-10-12 20:58:02 +0200
committerYorhel <git@yorhel.nl>2015-10-12 21:17:48 +0200
commit61251790bd1da10eebee3c56a70a9711e7680ce8 (patch)
treeccf47fd384b54cf4d5c9bc378c556fc3aa3e6535 /util/sql/schema.sql
parent1a6dd0160a75bc83390912dfb2635cd5664ce9ee (diff)
Notifications: Allow max 500 notifies per user + add SQL index on uid
Turns out that fetching whether or not you have unread notifications (done on every pageview if you're logged in) was pretty slow. The index speeds up both that query and the "my notifications" view. The extra purge for old notifications for users with more than 500 notifications ensures that the index stays effective for the unread notifications count. Otherwise it'll have to read half of the notifications table anyway to check the 'unread' filter.
Diffstat (limited to 'util/sql/schema.sql')
0 files changed, 0 insertions, 0 deletions