Talking head
MountainWest RubyConf 2014

This presentation, by Eileen Uchitelle, is licensed under a Creative Commons Attribution ShareAlike 3.0

The magic of ActiveRecord database interactions is easy to rely on and allows us assume it knows best. Without a solid understanding of how ActiveRecord translates into MySQL, however, significant issues can arise. This is particularly true with large data sets and complex model relationships. My talk explores an example for each CRUD function and shows how these queries can result in MySQL timeouts, memory issues or stack level too deep errors. The examples will examine the consequences of chaining large datasets, uses for Arel, and how to avoid encountering major problems and most importantly, how these queries can be rewritten to run more efficiently.

Rated: Everyone
Viewed 1,967 times
Tags: There are no tags for this video.