search for: stat_final_rank

Displaying 1 result from an estimated 1 matches for "stat_final_rank".

2007 Dec 20
3
ActiveRecords Eager Loading
Hi, I am doing an eager loading in ruby on rails using below statement ------------------------ Article.find(:all, :include => [:asset, :vote], :conditions=>"assets.parent_id is null", :order=>"stat_final_ranking desc", :limit=>20) --------------------------------------- the above statement resulted in this expensive query. After indexing, it take about 3 seconds to execute. (before indexing it is about 25 seconds) SELECT DISTINCT articles.id FROM articles LEFT OUTER JOIN assets ON assets.attach...