On Thu, Mar 5, 2009 at 14:27, blj <[email protected]> wrote:

>
> May be I am missing something obvious, but I do not understand why the
> method find_in_batches cannot take the option[:order].


Ordering is forced to the "id" column because:

   1. mysql optimizes iterating over huge datasets when you use the "WHERE
   id > ?" clause much better than with LIMIT and OFFSET;
   2. you don't need ordering -- every single record gets yielded.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to