diff options
author | Toon Claes <toon@gitlab.com> | 2017-04-21 12:36:34 +0300 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-08-03 17:31:05 +0300 |
commit | a723cba57493ec3220596ca8543a8b1b1ec118fe (patch) | |
tree | fc1048fe60a21339cef711caf69aff59edf5a5fb /app/finders/todos_finder.rb | |
parent | c39daf937bd62eedcbe7e3b44f107bb7e87452e7 (diff) |
Avoid plucking Todo ids and use sub-queries instead
TodoService should not call `.select(&:id)` on todos, because this is
bad performance. So instead use sub-queries, which will result in a
single SQL query to the database.
https://docs.gitlab.com/ee/development/sql.html#plucking-ids
Diffstat (limited to 'app/finders/todos_finder.rb')
0 files changed, 0 insertions, 0 deletions