Better Rails by Knowing Better Database by Ding ding Ye
summary
Slides and demos show databases cause roughly 44% of app performance bottlenecks versus 32% in app servers and 10% on the network, explain B+ tree index behavior and when indexes hurt, and recommend indexes only for large, non‑highly‑volatile fields. Concrete fixes include Rails 4.2 foreign key support for real referential integrity, using materialized views for reporting to avoid repeated joins, and preferring after_commit vs after_save visibility when enqueueing background jobs so jobs see committed rows.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:51Database knowledge for Rails
- 3:17Database performance bottleneck
- 4:01Data modeling in Rails
- 8:18Database views for queries
- 12:38How indexes work
- 21:17Database transactions and ACID
- 27:46Transaction isolation levels
- 32:20Summary
related talks
14mDatabase Performance at Scale for RoR Applications
01h 52mBuild High Performance Active Record Apps
25mPowerful Data: Making Rails Apps Faster with Aggregation
31m"Optimizing SQL Queries"
41mUsing Databases to Pull Your Application Weight
01h 52mBuild High Performance Active Record Apps
24mFrom Expensive Queries to Smart Caching: A DBA’s Guide for Rails
56mScaling Rails API to Write-Heavy Traffic
