1. 04 6月, 2018 1 次提交
  2. 01 6月, 2018 1 次提交
  3. 31 5月, 2018 4 次提交
  4. 30 5月, 2018 2 次提交
  5. 29 5月, 2018 2 次提交
  6. 28 5月, 2018 1 次提交
    • Y
      Added partial index for merge requests · 709dd237
      Yorick Peterse 提交于
      This index is added on `(target_project_id, iid)` and has a `WHERE state
      = 'opened'` condition. Using this index we can drastically improve the
      performance of the query used to count the total number of merge
      requests in a group. Without this index the query would eventually
      perform the following:
      
          ->  Index Scan using index_merge_requests_on_target_project_id_and_iid on merge_requests  (cost=0.43..4.89 rows=7 width=4) (actual time=0.058..0.353 rows=6 loops=228)
                Index Cond: (target_project_id = projects.id)
                Filter: ((state)::text = 'opened'::text)
                Rows Removed by Filter: 141
                Buffers: shared hit=34351 dirtied=1
      
      Out of the ~180 milliseconds the entire query would take, around 170
      milliseconds was spent in just this segment. With the index in place,
      the above segment is turned into the following:
      
          ->  Index Only Scan using yorick_test on merge_requests  (cost=0.42..0.55 rows=7 width=4) (actual time=0.004..0.010 rows=6 loops=228)
                Index Cond: (target_project_id = projects.id)
                Heap Fetches: 419
                Buffers: shared hit=1381
      
      The index also reduces the total query time to roughly 10 milliseconds.
      709dd237
  7. 25 5月, 2018 3 次提交
  8. 22 5月, 2018 1 次提交
  9. 21 5月, 2018 1 次提交
  10. 15 5月, 2018 2 次提交
    • S
      Add a unique and not null constraint on the project_features.project_id column · 3126e89e
      Stan Hu 提交于
      This commit has two migrations:
      
      1. The first prunes duplicate rows in the project_features table and leaves
         the row with the highest ID.  Since the behavior was indeterministic before
         and depended on which row the database decided to use, this change at least
         makes the permissions consistent. For example, in some cases, the Wiki may
         have been disabled but enabled in another entry.
      
      2. The second adds a non-null constraint on the project_features.project_id
         column.
      
      Closes #37882
      
      Fixes a significant part of gitlab-com/migration#408.
      
      We found that we were overcounting Wikis because of these duplicates.
      On GitLab.com, there are 56 rows with duplicate entries by project_id, and 16,661 rows with NULL project_id values.
      3126e89e
    • D
      Add index on runner_type for ci_runners · 528859dd
      Dylan Griffith 提交于
      We use this to filter runner and will use this increasingly in future
      instead of is_shared so it should be indexed
      528859dd
  11. 09 5月, 2018 2 次提交
  12. 08 5月, 2018 3 次提交
  13. 07 5月, 2018 3 次提交
  14. 04 5月, 2018 5 次提交
  15. 03 5月, 2018 7 次提交
  16. 02 5月, 2018 2 次提交