From 18c60c68f135eba8bddd918ac355a64859c05368 Mon Sep 17 00:00:00 2001 From: William Allen Date: Wed, 18 Nov 2026 08:13:24 -0500 Subject: [PATCH] Add index for latest parent build per project The projects page and the project home page show when each project last submitted a build. Finding that build meant reading every parent build of the project from the table, which gets slow as build history grows. This adds a partial index on `build(projectid, submittime, id) WHERE parentid IS NULL`, so the same query can be answered from the index alone. --- ...1_13_140630_build_most_recent_parent_index.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 database/migrations/2026_11_13_140630_build_most_recent_parent_index.php diff --git a/database/migrations/2026_11_13_140630_build_most_recent_parent_index.php b/database/migrations/2026_11_13_140630_build_most_recent_parent_index.php new file mode 100644 index 0000000000..a882c56fc9 --- /dev/null +++ b/database/migrations/2026_11_13_140630_build_most_recent_parent_index.php @@ -0,0 +1,15 @@ +