• S
    Add index to labels for `type` and project_id` · 1e97a6df
    Stan Hu 提交于
    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
    1e97a6df
20170204181513_add_index_to_labels_for_type_and_project.rb 238 字节