Hi! I have the next model with the follow associations: class XmlGen < ActiveRecord::Base set_primary_key "pk" belongs_to :serie, :foreign_key => "series_fk" class Serie < ActiveRecord::Base set_primary_key "pk" belongs_to :study, #Relaciones entre las clases Study y Series. A study has many series. :foreign_key => "study_fk" has_many :xml_genes I did the follow query: @instances = Instance.find(:all, :include => [:serie, {:serie=>:study}]) but the query is so slow. I want to try do the query manually, with the option :joins. How do I do this query, exactly, the parameter :joins? Thanks in advance! --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---