diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-16 12:10:32 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-16 12:10:32 +0000 |
commit | edecab2041c1be24f430bc4ab6615116273b6659 (patch) | |
tree | ca3cc9ffa4a8cef1e9f1929cb5a5bc1196a84168 /lib | |
parent | 680d37b3f3868d11e7cd46b3e965febde5806964 (diff) | |
parent | 2a60f4dea86c9aa052d88de9c772e91750885a9a (diff) | |
download | gitlab-ce-edecab2041c1be24f430bc4ab6615116273b6659.tar.gz |
Merge branch 'snippets-search-performance' into 'master'
Reduce query count for snippet search
See merge request !9254
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/snippet_search_results.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/snippet_search_results.rb b/lib/gitlab/snippet_search_results.rb index 9e01f02029c..b85f70e450e 100644 --- a/lib/gitlab/snippet_search_results.rb +++ b/lib/gitlab/snippet_search_results.rb @@ -31,11 +31,11 @@ module Gitlab private def snippet_titles - limit_snippets.search(query).order('updated_at DESC') + limit_snippets.search(query).order('updated_at DESC').includes(:author) end def snippet_blobs - limit_snippets.search_code(query).order('updated_at DESC') + limit_snippets.search_code(query).order('updated_at DESC').includes(:author) end def default_scope |