Nextcloud の警告「データベースにいくつかのインデックスがありません。」

2022-07-19

Nextcloud で「概要」→「セキュリティ&セットアップ警告」を確認すると、下記のような警告メッセージが表示されてました。

データベースにいくつかのインデックスがありません。 
大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 
"occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 
インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。

テーブル "oc_filecache"のインデックス "fs_storage_path_prefix"が見つかりません。
テーブル "oc_filecache"のインデックス "fs_id_storage_size"が見つかりません。
テーブル "oc_properties"のインデックス "properties_pathonly_index"が見つかりません。

データベースにいくつかのインデックスがありませんと表示されています。「occ db:add-missing-indices」を実行すれば、インデックスを追加されるとの事ですので、そのコマンドを実行してみます。
occ はNextcloud が配置されているディレクトリにありますので、そのディレクトリにある「occ」を指定して実行すれば、インデックスが追加されます

# sudo -u apache php /var/www/html/nextcloud/occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional path index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
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.
Adding properties_pathonly_index index to the oc_properties table, this can take some time...
oc_properties table updated successfully.

 

スポンサーリンク

0
0