Frederick Cheung wrote: [...] >> That's going to iterate over all of the records. �twice! �in interpreted >> code! > > partition will do it in one
Hey, that's good to know! If you need to do the partitioning in the DB, you could use ORDER BY abs(id - :magic_id). That way the first record will be the magic one. > > Fred Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en -~----------~----~----~----~------~----~------~--~---

