Using Databases to pull your applications weight
summary
Shows concrete changes and measured wins: move heavy filtering and JSON assembly into Postgres, use materialized views for repeated reports, and convert queries to JSON so the database returns ready payloads. Using Postgres plus a small helper like the Surus gem reduces an API from ~2s to ~200ms and raises throughput from ~25 to ~467 requests/sec. Index judiciously, preload arrays to avoid many objects, and disable synchronous commits for noncritical writes to speed ingestion at the cost of possible recent data loss.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:06The case for database tools
- 4:45Understanding query planners
- 6:11Optimizing with EXPLAIN
- 8:47Indexing strategies
- 11:43Attribute preloading
- 13:10Utilizing database views
- 17:35Benchmarking and tradeoffs
- 20:06Generating JSON in database
- 25:46Synchronous commits
- 28:52Conclusion and Q&A
related talks
41mUsing Databases to Pull Your Application Weight
46mUse PostgreSQL, not Rails, to make Rails Faster!
42mHolistic Database Application Tuning
31mMaking Data Dance
43mJust Use Postgres.
01h 01mNew Approach to Resolve objectrelational impedance mismatch
30mPuny to Powerful PostgreSQL Rails Apps
23mFANTASTIC DATABASES AND WHERE TO FIND THEM
