Ruby on Rails Monday, October 3, 2011

In addition to Matt's suggestions, I'd suggest you learn how to
formulate a where clause that includes AND and OR clauses. The UNION
appears to be completely unnecessary and is tripling what appears to
be a completely inefficient query to start with.

UNION does have it's uses, but querying the same fields from the same
tables with relatively simple conditions isn't one of them.

Jim

--
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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment