I have three questions:
1)
file_or_folder
and dataset
each have many metainstance
s. Given the following query:
p= Metainstance.find(:first, :conditions=>["file_or_folder_id=? AND dataset_id=?", some.id, dataset_id],:include=>[:file_or_folder,:dataset])
Does eager loading apply on file_or_folder
and dataset
? Also, what is the best way of writing this query?
2) If I need to retrieve a huge amount of data, is it more efficient to write queries using joins
or includes
option or by using scopes.
3) I cannot use page caching, as I have dynamic content that keeps on changing. How else can I improve the performance of a Rails app?