Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
NARKOZ
on June 28, 2015
|
parent
|
context
|
favorite
| on:
Using Nested Selects for Performance in Rails
Author could use counter cache to solve the problem.
schneidmaster
on June 30, 2015
[–]
Author here. That would work for a count (so perhaps that was a poor example to choose for this post) but we also use calculated_attributes for many more complex cases (for example, querying the earliest date in 3 columns across 3 tables).
NARKOZ
on July 5, 2015
|
parent
[–]
There is a gem called eager_group that you might find useful.
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: