Fehlende Nextcloud-Indicies erzeugen

Unter Umständen kann es bei einer Nextcloud-Installation dazu kommen, das nach einem Update folgende Meldung im Backend angezeigt wird:

In der Datenbank fehlen einige Indizes. Auf Grund der Tatsache, dass das Hinzufügen von Indizes in großen Tabellen einige Zeit in Anspruch nehmen kann, wurden diese nicht automatisch erzeugt. Durch das Ausführen von „occ db:add-missing-indices“ können die fehlenden Indizes manuell hinzugefügt werden, während die Instanz weiter läuft. Nachdem die Indizes hinzugefügt wurden, sind Anfragen auf die Tabellen normalerweise schneller.

Fehlender Index „direct_edit_timestamp“ in der Tabelle „oc_direct_edit“.

Fehlende Indices können unter anderem zu Performanceeinbußen führen, sodass die Indices erstellt werden sollten. Möglich ist dies mit dem Tool occ, welches in der Nextcloud-Installation vorhanden ist. Dieses sollte im Ordner der Nextcloud-Installation ausgeführt werden:

sudo -u www-data php occ db:add-missing-indices

Anschließend findet eine Überprüfung der Indices statt:

Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Adding direct_edit_timestamp index to the oc_direct_edit table, this can take some time...
oc_direct_edit table updated successfully.

Fehlende Indices werden hierbei automatisch angelegt und damit eventuellen Performanceeinbußen vorgebeugt.