Commit 4dde0100 authored by Marcia Ramos's avatar Marcia Ramos

Merge branch 'remove-hyperbole-from-database-docs-pluck' into 'master'

Remove hyperbolic tone from SQL guideline on pluck

See merge request gitlab-org/gitlab!37784
parents d485da22 170b65b3
......@@ -218,9 +218,9 @@ Project.select(:id, :user_id).joins(:merge_requests)
## Plucking IDs
This can't be stressed enough: **never** use ActiveRecord's `pluck` to pluck a
set of values into memory only to use them as an argument for another query. For
example, this will make the database **very** sad:
Never use ActiveRecord's `pluck` to pluck a set of values into memory only to
use them as an argument for another query. For example, this will execute an
extra unecessary database query and load a lot of unecessary data into memory:
```ruby
projects = Project.all.pluck(:id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment