~/talk

From PostgreSQL to SQLite in Rails

Talkat Balkan Ruby 2026 · 2026-05-15..05-16· [ruby-on-rails, databases]
links:none on file
slides:none on file

Migrating a Rails monolith from Postgres to SQLite reduces infra cost by an order of magnitude and cuts average request latency ~50% while keeping deployments as simple as bundling the app. Migration steps include converting Postgres-only types to strings or JSON, dropping and later rewriting check constraints, and running a data conversion script; backups use Litestream to Cloudflare R2 for point‑in‑time recovery. Real case: migrated <2GB DB with <3M rows, uses sqlean extensions for missing SQL functions, and the setup works in production with single-writer limits mitigated by vertical scaling and multiple DB files.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:03Benefits of SQLite in Rails
  3. 8:05Migration approach and challenges
  4. 12:15SQLite extensions and custom functions
  5. 15:54Key differences and trade-offs
  6. 19:35Scaling and replication options
  7. 21:08Backup strategies with Litestream
  8. 22:19Conclusion and final thoughts
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.