|
|
|
|
|
by e12e
2459 days ago
|
|
Somewhat on the side, but: > By using the includes method we've been able to knock our queries down from six to two: The first to find the events, and the second to find the categories for those events. Am I the only one that thinks rails/activerecord is crazy here for (often) preferring two trips to the db over a join on indexed primary keys? Are there really (sane) use-cases where that is better? |
|
You mean
?If the average user record includes a non-trivial amount of data and there are many comments, you're repeating a lot of information in the query results.
disclaimer: I'm currently doing some work for pganalyze.com (the blog host)