1. 15 Mar, 2016 1 commit
    • Yorick Peterse's avatar
      Ignore eager loading in Project.search UNION · 26b126f838c7
      Yorick Peterse authored
      The queries that are UNION'd together don't need any eager loading
      (since we really only use the resulting SQL instead of having
      ActiveRecord actually run the queries). By dropping any eager loaded
      associations queries such as the following work instead of producing a
      SQL error:
      
          Project.all.includes(:namespace).search('foo')
      26b126f838c7
  2. 11 Mar, 2016 2 commits
    • Yorick Peterse's avatar
      Use ILIKE in Project.search_by_title · be12a3a0e063
      Yorick Peterse authored
      Similar to the changes made to Project.search the method
      Project.search_by_title now also uses Arel so it can automatically use
      ILIKE/LIKE instead of the lower() function.
      be12a3a0e063
    • Yorick Peterse's avatar
      Use ILIKE/LIKE + UNION in Project.search · 63941313f540
      Yorick Peterse authored
      This chance is broken up in two steps:
      
      1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
         "WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
         using lower(). In many cases the use of lower() will force a slow
         sequence scan.
      
      2. Instead of using 1 query that searches both projects and namespaces
         using a JOIN we're using 2 separate queries that are UNION'd
         together. Using a JOIN would force a slow sequence scan, using a
         UNION avoids this.
      
      This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
      and LIKE on MySQL, removing the need to handle this manually.
      63941313f540
  3. 09 Mar, 2016 1 commit
  4. 08 Mar, 2016 1 commit
  5. 07 Mar, 2016 2 commits
  6. 26 Feb, 2016 1 commit
    • Yorick Peterse's avatar
      Flush repository caches before renaming projects · e19fc7ede028
      Yorick Peterse authored
      This ensures that if a project is later re-created using the old path it
      doesn't end up re-using the old cache. This also ensures we don't keep
      the cache around until its expired by Redis itself.
      
      Fixes gitlab-org/gitlab-ce#13790
      e19fc7ede028
  7. 19 Feb, 2016 1 commit
  8. 06 Jan, 2016 1 commit
  9. 24 Dec, 2015 1 commit
  10. 12 Dec, 2015 1 commit
  11. 11 Dec, 2015 4 commits
  12. 09 Dec, 2015 2 commits
  13. 03 Dec, 2015 1 commit
  14. 18 Nov, 2015 2 commits
  15. 13 Nov, 2015 1 commit
  16. 06 Oct, 2015 1 commit
    • Yorick Peterse's avatar
      Revamp trending projects query · fd1c2ecb6709
      Yorick Peterse authored
      This changes the query to use a COUNT nested in an INNER JOIN, instead
      of a COUNT plus a GROUP BY. There are two reasons for this:
      
      1. Using a COUNT in an INNER JOIN can be quite a bit faster.
      2. The use of a GROUP BY means that method calls such as "any?"
         (and everything else that calls "count") operate on a Hash that
         counts the amount of notes on a per project basis, instead of just
         counting the total amount of projects.
      
      The query has been moved into Project.trending as its logic is simple
      enough. As a result of this testing the TrendingProjectsFinder class
      simply involves testing if the right methods are called, removing the
      need for setting up database records.
      fd1c2ecb6709
  17. 03 Oct, 2015 1 commit
  18. 02 Oct, 2015 1 commit
  19. 29 Sep, 2015 2 commits
  20. 23 Sep, 2015 2 commits
  21. 18 Sep, 2015 1 commit
  22. 11 Aug, 2015 2 commits
  23. 02 Aug, 2015 1 commit
  24. 29 Jul, 2015 1 commit
  25. 15 Jul, 2015 1 commit
  26. 22 Jun, 2015 1 commit
  27. 10 Jun, 2015 1 commit
  28. 26 May, 2015 1 commit
  29. 01 May, 2015 1 commit
  30. 01 Mar, 2015 1 commit