Christophe Decaux wrote:
> If I may jump in, I'm interested in understanding why you would do this 
> kind of database job with Ruby vs. an extra SQL query.
> I had the feeling that it would be wiser (and would execute faster) to 
> delegate the job to the database engine

I agree. This is a job for SELECT DISTINCT, unless you've already got 
the recordset stored from a previous operation.

In general, do your DB queries on the DB side.

> 
> But I'm kind of amateur.
> 
> Thanks to anyone who is willing to put some light for me

Light: many Rails developers don't know how to use a DB properly. :)

> 
> Christophe
> 
> Le 15 avr. 2010 � 10:01, Franz Strebel a �crit :

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to