~/talk

CRUD! The Consequences of Not Understanding How ActiveRecord ...

Talkat MountainWest RubyConf 2014 · 2014-03-20..03-21· [databases, ruby]
slides:none on file

Shows concrete failures and fixes: naive ActiveRecord INSERT-per-row makes 10,000 inserts take 45.9s → <3s by switching to batched raw INSERTs, with a tested batch size ~2000 to avoid max_packet issues; use find_each and pluck to avoid memory bloat (pluck on 100k records hits 2.11s vs each/find_each ≈9–11s); prefer update_all/delete directly or raw SQL instead of instantiating objects; mentions Arel, MySQL, NewRelic, MiniProfiler and Bullet as profiling tools and warns of timeouts, memory and stack errors.

AI-written summary · about

  1. 0:00Introduction
  2. 1:20The pitfalls of Active Record
  3. 2:55Application model overview
  4. 4:48Optimizing data creation
  5. 8:21Efficient data retrieval
  6. 10:47Updating records in bulk
  7. 12:10Bulk deletion techniques
  8. 18:04Conclusion and tools
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.