Component Search using Loose Index Scan
What does this MR do and why?
Closes: #490352 (closed)
Relates to: #442407 (comment 2113140223)
This MR implements a custom loose index scan for searching components at the group level. We have iterated several times to find a feasible solution, which is why you will find non-standard query usage in this MR.
DB Explain:
- Group Level:
- Without Search Term (800ms): https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31657/commands/98152
- With Search Term (115ms): https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31657/commands/98177
- Project Level:
- Without Search Term (100ms): https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31657/commands/98140
- With Search Term (100ms): https://console.postgres.ai/gitlab/gitlab-production-main/sessions/31657/commands/98140
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- In rails console -
Feature.enable(:group_level_dependencies_filtering_by_component)
- You must have a project (in a group) with dependencies for this to work.
query groupQuery {
group(fullPath: "groupName") {
components(name: <component name, or empty>) {
nodes {
id
name
}
}
}
}
query projectQuery {
project(fullPath: "groupName/projectName") {
components(name: <component name, or empty>) {
nodes {
id
name
}
}
}
}
Edited by Ryan Wells