1. 29 7月, 2019 1 次提交
  2. 25 7月, 2019 1 次提交
  3. 07 6月, 2019 1 次提交
  4. 07 5月, 2019 1 次提交
  5. 09 4月, 2019 2 次提交
  6. 05 4月, 2019 2 次提交
  7. 04 4月, 2019 1 次提交
    • S
      Extend CTE search optimisation to projects · 10ceb33b
      Sean McGivern 提交于
      When we use the `search` param on an `IssuableFinder`, we can run into
      issues. We have trigram indexes to support these searches. On
      GitLab.com, we often see Postgres's optimiser prioritise the (global)
      trigram indexes over the index on `project_id`. For group and project
      searches, we know that it will be quicker to filter by `project_id`
      first, as it returns fewer rows in most cases.
      
      For group issues search, we ran into this issue previously, and went
      through the following iterations:
      
      1. Use a CTE on the project IDs as an optimisation fence. This prevents
         the planner from disregarding the index on `project_id`.
         Unfortunately it breaks some types of sorting, like priority and
         popularity, as they sort on a joined table.
      2. Use a subquery for listing issues, and a CTE for counts. The subquery
         - in the case of group lists - didn't help as much as the CTE, but
         was faster than not including it. We can safely use a CTE for counts
         as they don't have sorting.
      
      Now, however, we're seeing the same issue in a project context. The
      subquery doesn't help at all there (it would only return one row, after
      all). In an attempt to keep total code complexity under control, this
      commit removes the subquery optimisation and applies the CTE
      optimisation only for sorts we know that are safe.
      
      This means that for more complicated sorts (like priority and
      popularity), the search will continue to be very slow. If this is a
      high-priority issue, we can consider introducing further optimisations,
      but this finder is already very complicated and additional complexity
      has a cost.
      
      The group CTE optimisation is controlled by the same feature flag as
      before, `attempt_group_search_optimizations`, which is enabled by
      default. The new project CTE optimisation is controlled by a new feature
      flag, `attempt_project_search_optimizations`, which is disabled by
      default.
      10ceb33b
  8. 22 3月, 2019 1 次提交
  9. 19 3月, 2019 1 次提交
  10. 01 3月, 2019 1 次提交
    • M
      Always use CTE for IssuableFinder counts · 39afba06
      Mario de la Ossa 提交于
      Since the CTE is faster than a subquery and the only reason we're using
      a subquery is that the CTE can't handle sorting by certain attributes,
      let's use the CTE always (when the feature flag is enabled) when
      counting, since we can ignore ordering if we just want a count of
      results.
      39afba06
  11. 26 2月, 2019 2 次提交
  12. 22 2月, 2019 1 次提交
  13. 21 2月, 2019 2 次提交
  14. 14 1月, 2019 1 次提交
  15. 31 12月, 2018 1 次提交
  16. 30 11月, 2018 1 次提交
    • S
      Add a flag to use a subquery for group issues search · 7fd5dbf9
      Sean McGivern 提交于
      We already had a flag to use a CTE, but this broke searching in some
      cases where we need to sort by a joined table. Disabling the CTE flag
      makes searches much slower.
      
      The new flag, to use a subquery, makes them slightly slower than the
      CTE, while maintaining correctness. If both it and the CTE flag are
      enabled, the subquery takes precedence.
      7fd5dbf9
  17. 23 11月, 2018 1 次提交
    • J
      Filter by `None`/`Any` for labels in issues/mrs API · c068ac67
      Jacopo 提交于
      By using the parameters `?labels=None|Any` the user can filter
      issues/mrs from the API that has `none/any` label.
      
      Affected endpoints are:
      
      - /api/issues
      - /api/projects/:id/issues
      - /api/groups/:id/issues
      - /api/merge_requests
      - /api/projects/:id/merge_requests
      - /api/groups/:id/merge_requests
      c068ac67
  18. 01 11月, 2018 2 次提交
  19. 26 10月, 2018 2 次提交
  20. 03 10月, 2018 1 次提交
  21. 02 10月, 2018 1 次提交
  22. 11 7月, 2018 1 次提交
  23. 21 5月, 2018 1 次提交
  24. 05 3月, 2018 1 次提交
  25. 01 2月, 2018 1 次提交
  26. 22 12月, 2017 1 次提交
  27. 05 9月, 2017 1 次提交
    • Y
      Re-use issue/MR counts for the pagination system · 42062a45
      Yorick Peterse 提交于
      This changes the issue and MR index pages so the pagination system
      re-uses the output of the COUNT(*) query used to calculate the number of
      rows per state (opened, closed, etc). This removes the need for an
      additional COUNT(*) on both pages.
      42062a45
  28. 30 8月, 2017 1 次提交
  29. 03 8月, 2017 1 次提交
  30. 07 7月, 2017 1 次提交
  31. 30 6月, 2017 2 次提交
    • S
      Make finders responsible for counter cache keys · 0c6cdd07
      Sean McGivern 提交于
      0c6cdd07
    • S
      Only do complicated confidentiality checks when necessary · 42ccb598
      Sean McGivern 提交于
      When we are filtering by a single project, and the current user has access to
      see confidential issues on that project, we don't need to filter by
      confidentiality at all - just as if the user were an admin.
      
      The filter by confidentiality often picks a non-optimal query plan: for
      instance, AND-ing the results of all issues in the project (a relatively small
      set), and all issues in the states requested (a huge set), rather than just
      starting small and winnowing further.
      42ccb598
  32. 19 6月, 2017 1 次提交
  33. 15 6月, 2017 1 次提交