Database missing indexes

Hi all,

Got this error in the new nextcloud version 14-

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.

How do i run the occ command in terminal so I can try to work out the error

Many thanks,

you have to run the command as your webserver user.
E.g: sudo -u www-data php /path/to/nextcloud/occ db:add-missing-indices

thanks sorted it -

cd /var/www/html/nextcloud/

sudo -u apache php occ db:add-missing-indices