03/13/13: [SF] Use postgres!

March 13, 2013 David Stevenson

Helps

eager-loading nested polymorphic associations

We have a controller action that performs n+1 queries to present associated models as nested hashes. The typical solution is to use :include to eager-load associations. Unfortunately, the models are related polymorphically, and :include can’t eager-load nested polymorphic associations. What can we do?

Interestings

Use postgres!

Because in rails it automatically puts a transaction around for DDL statements and rolls them back when things don’t work. Fixing this in mysql can be a huge pain.

About the Author

Biography

Previous
Mobility is about enabling employees, not about squeezing more hours out of them
Mobility is about enabling employees, not about squeezing more hours out of them

Some companies justify Bring Your Own Device (BYOD) because it shifts costs to workers or turns some home t...

Next
6 Third Party Tools for Automatic Bug Creation and More
6 Third Party Tools for Automatic Bug Creation and More

Pivotal Tracker lets you stay on top of everything to do with your project, but sometimes your stories need...