Sequel: When ActiveRecord is not enough
summary
Claims concrete wins: Sequel yields ~2× faster queries and ~3× fewer allocations in a 1,000-row benchmark versus ActiveRecord, and reads all columns eagerly to avoid hidden lazy costs. Tooling includes a rich expression API (like Arel but public), a Postgres JSONB expression builder, cursor/stream and COPY support, and a plugin model that keeps core small. Connection handling avoids AR pool pitfalls and there’s a reuse ActiveRecord connection gem to integrate Sequel into Rails.
AI-written summary · about
chapters (15)
- 0:00Intro
- 2:45About me
- 5:30Comparing ActiveRecord and Sequel
- 8:14ActiveRecord API
- 9:51ActiveRecord Associations
- 10:57SQL Design
- 13:07SQL Complexity
- 15:04SQL Expressions
- 18:50eager loading
- 21:23advanced features
- 23:27performance
- 27:25connection pool
- 29:33SQL in Rails
- 30:47SQL Models
- 32:19Conclusion
related talks
28mSequel
25mActiveRecord can't do it? Arel can!
46mUse PostgreSQL, not Rails, to make Rails Faster!
21mActiveRecord can't do it? Arel can!
35mAdvanced aRel: When ActiveRecord Just Isn't Enough
28mActive Record Scopes and Arel
32mArel: The Ruby Relational Algebra Library
29mActiveRecord, the Repository Pattern, and You
