Help with occ db:add-missing-indices

Hi,
after nextcloud update 19.0.3 * 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 index “properties_path_index” in table “oc_properties”.
  • The database is missing some optional columns. Due to the fact that adding columns on big tables could take some time they were not added automatically when they can be optional. By running “occ db:add-missing-columns” those missing columns could be added manually while the instance keeps running. Once the columns are added some features might improve responsiveness or usability.
    • Missing optional column “reference_id” in table “oc_comments”.

I Run this Command:

sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns

And every is Ok Now.

8 Likes