summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-06-20 22:31:48 +0000
committerStan Hu <stanhu@gmail.com>2018-06-20 22:31:48 +0000
commitc0616ba8aaf9cbb46cc7476e5d4b08d0e98863ca (patch)
tree877f2cd57437288b150951aef8105d51d78d4238 /doc
parente40aa397700f997b320d9e6299ab3b15b75c77a8 (diff)
parentba56b3447098890d313f943781b5413c566e14cd (diff)
downloadgitlab-ce-c0616ba8aaf9cbb46cc7476e5d4b08d0e98863ca.tar.gz
Merge branch 'mk/fix-n-plus-1-queries-in-uploads-check-rake-task' into 'master'
Fix N+1 queries in uploads check rake task Closes #47924 See merge request gitlab-org/gitlab-ce!20012
Diffstat (limited to 'doc')
-rw-r--r--doc/development/query_recorder.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md
index 61e5e1afede..2167ed57428 100644
--- a/doc/development/query_recorder.md
+++ b/doc/development/query_recorder.md
@@ -28,6 +28,7 @@ By default, QueryRecorder will ignore cached queries in the count. However, it m
all queries to avoid introducing an N+1 query that may be masked by the statement cache. To do this,
pass the `skip_cached` variable to `QueryRecorder` and use the `exceed_all_query_limit` matcher:
+```
it "avoids N+1 database queries" do
control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) { visit_some_page }.count
create_list(:issue, 5)