Hi,

in my opinion I would order by something in cases where few objets are 
retrieved from DB, for example when showing a result on a template to an 
end user. On the other side I would use find_in_batches or find_each for 
background jobs or queries dealing with lots of objects to reduce memory 
consumption... and in those cases I don't feel like any order is needed. 
Why do you think it is important to have them ordered?

Kind regards,
Alberto Almagro

El domingo, 28 de enero de 2018, 14:31:16 (UTC+1), 佑馬光吉 escribió:
>
> Currently, if "primary_key" does not exist, "find_in_batches" and 
> "find_each" will result in an error.
> Since there may be cases where "primary_key" does not exist when 
> performing batch processing,
> I think that it can be solved by adding an order option.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to