Prompt
What database should I use for events with timestamps?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
It depends on what you mean by “events,” but for events with timestamps the best default is usually:
Good general choice
- PostgreSQL if you want a reliable, flexible, general-purpose database.
- Great for storing event records
- Strong support for timestamps, indexing, querying by time ranges
- Easy to use for analytics, joins, and application data
If you have a high-volume event stream
- ClickHouse for analytics over huge volumes of events
- Very fast for time-based aggregations and reporting
- Better if you mostly read/analyze events rather than update them
If you need event sourcing / append-only logs
- EventStoreDB if the main model of your app is an event stream
- Built specifically for event sourcing
- Supports ordered event streams well
If you need time-series metrics/observability
- TimescaleDB on top of PostgreSQL
- Good if events are time-series-like and you want SQL
- Useful for sensor data, logs, metrics, telemetry
If you want a simple document store
- MongoDB can work, but is usually not my first choice for timestamp-heavy querying unless your data is naturally document-shaped.
Quick rule of thumb
- App events + transactions + flexible querying → PostgreSQL
- Massive analytics on events → ClickHouse
- Event sourcing → EventStoreDB
- Time-series metrics → TimescaleDB
If you tell me:
- how many events per day,
- whether you need analytics or just storage,
- whether you need updates/deletes, I can recommend a specific database and schema.