You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing index for queries run during upgrade #2710
During upgrade, some SQL DELETE requests may be run on the activity table that would miss an index to be run quickly.
The request have a WHERE clause lie this one:
WHERE affecteduser <> ...
AND object_type = 'calendar'
AND object_id = ...
AND subjectparams LIKE '%...%'
Creating a new index like this
ALTER TABLE nextcloud_db.oc_activity
ADD INDEX activity_object_cleanup_idx (object_type, object_id),
ALGORITHM=INPLACE,
LOCK=NONE;
This changed the execution plan from a full table scan to an index query.
Doing that solved the slow upgrade process.
Activity