§:2024-07-09
The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. Missing optional index "mail_messages_strucanalyz_idx" in table "mail_messages". Missing optional index "mail_class_creat_idx" in table "mail_classifiers". Missing optional index "mail_acc_prov_idx" in table "mail_accounts". Missing optional index "mail_alias_accid_idx" in table "mail_aliases". Missing optional index "mail_messages_mb_id_uid_uidx" in table "mail_messages". Missing optional index "mail_smime_certs_uid_email_idx" in table "mail_smime_certificates". Missing optional index "mail_trusted_senders_idx" in table "mail_trusted_senders". Missing optional index "mail_coll_idx" in table "mail_coll_addresses".
$ sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
[sudo] password for alexlai:
Adding additional mail_messages_strucanalyz_idx index to the oc_mail_messages table, this can take some time...
oc_mail_messages table updated successfully.
Adding additional mail_class_creat_idx index to the oc_mail_classifiers table, this can take some time...
oc_mail_classifiers table updated successfully.
Adding additional mail_acc_prov_idx index to the oc_mail_accounts table, this can take some time...
oc_mail_accounts table updated successfully.
Adding additional mail_alias_accid_idx index to the oc_mail_aliases table, this can take some time...
oc_mail_aliases table updated successfully.
Adding additional mail_messages_mb_id_uid_uidx index to the oc_mail_messages table, this can take some time...
Removing mail_messages_mb_id_uid index from the oc_mail_messages table
oc_mail_messages table updated successfully.
Adding additional mail_smime_certs_uid_email_idx index to the oc_mail_smime_certificates table, this can take some time...
Removing mail_smime_certs_uid_idx index from the oc_mail_smime_certificates table
oc_mail_smime_certificates table updated successfully.
Adding additional mail_trusted_senders_idx index to the oc_mail_trusted_senders table, this can take some time...
Removing mail_trusted_senders_type index from the oc_mail_trusted_senders table
oc_mail_trusted_senders table updated successfully.
Adding additional mail_coll_idx index to the oc_mail_coll_addresses table, this can take some time...
Removing mail_coll_addr_userid_index index from the oc_mail_coll_addresses table
Removing mail_coll_addr_email_index index from the oc_mail_coll_addresses table
oc_mail_coll_addresses table updated successfully.
# find /var/www/nextcloud -name nextcloud.log
/var/www/nextcloud/data/nextcloud.log