Skip to content
  • Stan Hu's avatar
    Add index to labels for `type` and project_id` · d667942d0222
    Stan Hu authored
    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
    d667942d0222