Skip to content

Add index for latest parent build per project - #4238

Merged
josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:projects-page-performance
Nov 18, 2026
Merged

josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:projects-page-performance

Conversation

@williamjallen

Copy link
Copy Markdown
Member

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.

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.
@josephsnyder
josephsnyder added this pull request to the merge queue Nov 18, 2026
Merged via the queue into Kitware:master with commit 660deb1 Nov 18, 2026
8 checks passed
@williamjallen
williamjallen deleted the projects-page-performance branch November 18, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants