Using Databases to Pull Your Application Weight
summary
Shows concrete database moves that cut CPU and cost: move heavy joins into Postgres materialized views, convert view rows to JSON in the DB instead of Ruby, use array/attribute preloading to avoid object bloat, and read EXPLAIN plans to force indexes only where they help. Disables synchronous_commit on ingesting devices to accept small data loss. Benchmarks: a 1M-row report drops from ~1s to 2.3ms; an API goes from ~2s to <200ms (sometimes 50ms); throughput jumps from 25 req/s to ~330 req/s.
AI-written summary · about
chapters (8)
- 0:00Introduction and speaker background
- 4:01Application scaling challenges
- 13:17Query planning and indexing
- 18:21Attribute preloading and N+1 queries
- 20:31Database views and materialized views
- 31:34JSON generation in databases
- 36:27Synchronous commit optimization
- 39:14Summary and key takeaways
related talks
31mUsing Databases to pull your applications weight
42mHolistic Database Application Tuning
23mFANTASTIC DATABASES AND WHERE TO FIND THEM
46mUse PostgreSQL, not Rails, to make Rails Faster!
01h 01mNew Approach to Resolve objectrelational impedance mismatch
37mCache is King: Get the Most Bang for Your Buck From Ruby
25mPowerful Data: Making Rails Apps Faster with Aggregation
41mOptimizing your app by understanding your PostgreSQL database
