Database / BetterDB Interview questions
What is the difference between BetterDB Monitor's memory and postgres storage?
| Aspect | memory | postgres |
| Persistence | Lost on restart | Durable across restarts |
| Setup | Default, zero config | STORAGE_TYPE=postgres + STORAGE_URL |
| Intended use | Testing, ephemeral environments | Production |
Beyond the table, the practical impact is what survives an upgrade: with memory, a container replace wipes slowlog history, client analytics, captures, and learned anomaly baselines instantly.
With postgres, that same history lives in an external database the container connects to, so redeploying, rescheduling on Kubernetes, or restarting for an image update doesn't cost you the historical record BetterDB exists to keep.
The switch is a config change, not a data migration path: pointing an existing memory-backed deployment at STORAGE_TYPE=postgres starts a fresh history in Postgres going forward, it doesn't recover what was already lost in memory.
More Related questions...