gitlab-org--gitlab-foss/db
Stan Hu 1e97a6df24 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
2017-02-04 10:22:32 -08:00
..
fixtures replace `find_with_namespace` with `find_by_full_path` 2017-02-03 07:14:04 +07:00
migrate Add index to labels for `type` and project_id` 2017-02-04 10:22:32 -08:00
post_migrate Reject projects without namespace 2017-01-24 11:25:43 +01:00
schema.rb Add index to labels for `type` and project_id` 2017-02-04 10:22:32 -08:00
seeds.rb init commit 2011-10-09 00:36:38 +03:00