Skip to content
Snippets Groups Projects
  1. Feb 14, 2018
  2. Feb 06, 2018
  3. Jan 23, 2018
    • Jan Provaznik's avatar
      Use limit for search count queries · 090ca9c3
      Jan Provaznik authored
      Search query is especially slow if a user searches a generic string
      which matches many records, in such case search can take tens of
      seconds or time out. To speed up the search query, we search only for
      first 1000 records, if there is >1000 matching records we just display
      "1000+" instead of precise total count supposing that with such amount
      the exact count is not so important for the user.
      
      Because for issues even limited search was not fast enough, 2-phase
      approach is used for issues: first we use simpler/faster query to get
      all public issues, if this exceeds the limit, we just return the limit.
      If the amount of matching results is lower than limit, we re-run more
      complex search query (which includes also confidential issues).
      Re-running the complex query should be fast enough in such case because the
      amount of matching issues is lower than limit.
      
      Because exact total_count is now limited, this patch also switches to
      to "prev/next" pagination.
      
      Related #40540
      090ca9c3
  4. Jan 11, 2018
  5. Jan 02, 2018
    • Jan Provaznik's avatar
      Skip projects filter on issues search · 017c1297
      Jan Provaznik authored
      When searching for issues, an additional subquery
      is added which filters only issues in a project. If global context is
      used (no project is specified) this query filters all projects user has
      access to.
      
      In that case we can skip this filter because filtering only projects
      user has access to is added anyway.
      
      The filter is used only if a custom project context is specified
      
      Related to #40540
      017c1297
  6. Dec 21, 2017
    • Jan Provaznik's avatar
      Skip projects filter on merge requests search · d2f1d585
      Jan Provaznik authored
      When searching for merge requests, an additional subquery
      is added which by default filters only merge requests which belong
      to source or target project user has permission for.
      
      This filter is not needed because more restrictive filter
      which checks if user has permission for target project
      is used in the query.
      
      So unless a custom projects filter is used by user, it's possible
      to skip the default projects filter and speed up the final query.
      
      Related to #40540
      d2f1d585
  7. Nov 24, 2017
  8. Apr 03, 2017
  9. Feb 23, 2017
  10. Jan 24, 2017
  11. Dec 09, 2016
  12. Nov 29, 2016
  13. Sep 06, 2016
  14. Mar 17, 2016
  15. Mar 11, 2016
    • Yorick Peterse's avatar
      Removed order from sub-query projects for search · b77b3b16
      Yorick Peterse authored
      There's no need to order queries used as sub-queries and doing so can
      add potential overhead.
      b77b3b16
    • Yorick Peterse's avatar
      Refactor Gitlab::SearchResults · 01354296
      Yorick Peterse authored
      Instead of plucking IDs this class now uses ActiveRecord::Relation
      objects. Plucking IDs is problematic as searching for projects can lead
      to a huge amount of IDs being loaded into memory only to be used as an
      argument for another query (instead of just using a sub-query).
      01354296
  16. Aug 24, 2015
  17. May 18, 2015
  18. Aug 27, 2014
  19. Aug 26, 2014
Loading