From 09364c2e93662b9c5430f55bf0ab22e373c83f96 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Apr 2026 18:02:15 +0200 Subject: [PATCH 1/2] perf: swap around root_id and mount_path_hash in index for old migration Signed-off-by: Robin Appelman --- core/Migrations/Version33000Date20251209123503.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Migrations/Version33000Date20251209123503.php b/core/Migrations/Version33000Date20251209123503.php index 1a9cdc44343..d5bb4f15105 100644 --- a/core/Migrations/Version33000Date20251209123503.php +++ b/core/Migrations/Version33000Date20251209123503.php @@ -42,7 +42,7 @@ class Version33000Date20251209123503 extends SimpleMigrationStep { if ($table->hasIndex('mounts_user_root_path_index')) { $table->dropIndex('mounts_user_root_path_index'); } - $table->addUniqueIndex(['user_id', 'root_id', 'mount_point_hash'], 'mounts_user_root_path_index'); + $table->addUniqueIndex(['user_id', 'mount_point_hash', 'root_id'], 'mounts_user_path_root_index'); return $schema; } From 6ac00044c8bb64c778fbbee0836b8621abce1904 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 22 Apr 2026 18:02:37 +0200 Subject: [PATCH 2/2] perf: missing indices for swapping around root_id and mount_path_hash Signed-off-by: Robin Appelman --- core/Listener/AddMissingIndicesListener.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/Listener/AddMissingIndicesListener.php b/core/Listener/AddMissingIndicesListener.php index f1d93218a41..78e85e4127a 100644 --- a/core/Listener/AddMissingIndicesListener.php +++ b/core/Listener/AddMissingIndicesListener.php @@ -223,5 +223,13 @@ class AddMissingIndicesListener implements IEventListener { ['user', 'mountpoint'], ['lengths' => [null, 128]] ); + + $event->replaceIndex( + 'mounts', + ['mounts_user_root_path_index'], + 'mounts_user_path_root_index', + ['user_id', 'mount_point_hash', 'root_id'], + true, + ); } }