Sometimes you're not querying a database (for example a REST service
that returns a json result). Specially in web applications.

On Apr 15, 12:15 pm, Marnen Laibow-Koser <[email protected]> wrote:
> 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-Koserhttp://www.marnen.org
> [email protected]
> --
> Posted viahttp://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.

Reply via email to