3 ms·
Yes, the OP here [0] says that the query was one that was generated from ruby's ActiveRecord. Clearly, removing the sort clause would speed up this query. I bel
by ghayes 11y ago
Yes, the OP here [0] says that the query was one that was generated from ruby's ActiveRecord. Clearly, removing the sort clause would speed up this query. I believe the issue (from the ruby perspective) is using ActiveRecord's `User.where(name: 'Captain Nemo').first` instead of `User.where(name: 'Captain Nemo').take` [1]
[0] https://news.ycombinator.com/item?id=8449329 https://news.ycombinator.com/item?id=8449329
[1] http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-take http://api.rubyonrails.org/classes/ActiveRecord/FinderMethod...