When you're building a new Rails app, ActiveRecord's defaults will take you far. Querying with .where, inserting with .save -- it's all so easy, and it’s fast enough. But after a while -- when a page of mostly simple content takes a second or more to come back from the server, when you start seeing 504 Gateway Timeout errors coming back from nginx because it's taking too long to process the CSV yo
![Speed up ActiveRecord with a little tweaking](https://cdn-ak-scissors.b.st-hatena.com/image/square/fe4620bdf95d4d499d3a5f90547082c441dbba86/height=288;version=1;width=512/https%3A%2F%2Fimages.ctfassets.net%2Fvtn4rfaw6n2j%2F7MnAVo94NiklcDhgJCbRpL%2Ffe552c0e6f09c4512b160b98b73a73ab%2Fhttps___no-cache.hubspot.com_cta_default_1169977_964db6a6-69da-4366-afea-b129019aff07.png%3Fw%3D1200%26h%3D630%26fit%3Dfill)