Rails Query optimization
14595
Rails 3 - Eager loading with conditions
120706
Clean way to find ActiveRecord objects by id in the order specified
146960
How to multiple query results in order to reduce the query number?
146163
Combining queries into one
108727
rails - using :select(distinct) with :has_many :through association produces invalid SQL
153090
How to run update query on multiple table via joins simultaneously on postgres?
95919
Rails has_many :through Find by Extra Attributes in Join Model
21145
Return more than 2000 records (SOQL)
40620
Is the overhead of frequent query cache invalidation ever worth it?
37349
Why does my query run fast in Environment A, but slow in Environment B?
16107
JOIN queries vs multiple queries
93153
Optimizing SQL for large volumes
146164
Speeding up a NOT IN subquery
43481
Returning query results in predefined order
128580
Efficiently storing query-affecting settings in a database
69825
Case-insensitive search in Rails model
116838
Query runs slow with date expression, but fast with string literal