Add index on zoekt repositories for schema checks
What does this MR do and why?
This change adds a new database index to improve query performance when searching for repositories in the Zoekt search system. The index is created on three columns (project_identifier, state, and schema_version) of the zoekt_repositories table, which will make it faster to find repositories based on these specific criteria. The migration is set up to run safely without blocking other database operations, and includes the proper rollback functionality to remove the index if needed.
Query Plans
Before
https://console.postgres.ai/gitlab/gitlab-production-main/sessions/43106/commands/131783
After
https://console.postgres.ai/gitlab/gitlab-production-main/sessions/43106/commands/131785
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.