Intercom uses #Rails to enable hundreds of engineers to ship changes quickly without slow, centralized reviews. But running migrations across hundreds of tables and terabytes of MySQL data comes with real risks. In his #RailsWorld 2025 @_minuteman3 will share the changes they made to reduce risk and enable their engineers to safely move fast.
https://t.co/VVCbixXU2e @intercom
@mhenrixon@ciaran_lee @qizler Worth a note here - with ignored columns we were listing off every column on the table in the query, the ignored columns had been dropped in many cases. So moving to select * was a pure saving, didn’t result in more data in the result set.
@mhenrixon@ciaran_lee @qizler In the same cost saving exercise we elsewhere made big wins by *not* using select * and not loading big, heavy fields in contexts they’re not needed. Always need to consider context, measure, verify. select * is a good default though!
@_exoconnor@ciaran_lee We also shaved off about half the query throughput - lots of redundant loads of the same object, easy to have it creep in over time in a big codebase. We already keep a copy of the object for every request, more on that here https://t.co/UoI4y7NVPC, so we just reused it!
@_exoconnor@ciaran_lee This was an odd case - the table is super wide and serves upwards of 4 billion queries per day, basically the intercom god object. Column names are obviously all strings and many fields are just ints, tinyints, etc. things add up super fast at scale!
The things that make a difference at scale are so wild.
Using ignored_columns in Rails results in SQL queries that list each column to be read, versus just "SELECT *". For tables with many columns, this meant we were sending ~20 TB of extra text to the database per day.
Okay, that's nuts. We sold out in 20 minutes!! I love this Rails Renaissance energy. I haven't felt this much excitement since the very earliest days of Rails. I can't wait to see all 1,000 lucky Rails World attendees in September.
@sarahthenolan 57 point bump this year. Points sharply rose since we started college though, they were in the high 400s before we graduated. https://t.co/yPi8C87Dd1 funny to think I couldn’t get into our course now.