Skip to content
Snippets Groups Projects
Commit 1e97a6df authored by Stan Hu's avatar Stan Hu
Browse files

Add index to labels for `type` and project_id`

When loading pages that display the number of open issues,
the backend runs a query such as:

```sql
SELECT "labels"."id" FROM "labels" WHERE "labels"."type" IN ('ProjectLabel') AND "labels"."project_id" = 1000
```

This results in an entire scan of the `labels` table. To optimize performance,
add the appropriate index to the table.

Closes #27676
parent 8a333d45
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment