TimescaleDB: Time-Series Data on PostgreSQL, from First Hypertable to Production
Learn TimescaleDB by building one sensor-fleet dataset of 2.16 million readings. Create hypertables, load data fast, query with time_bucket and window functions, design schemas, and use continuous aggregates, columnstore compression and retention policies. Tune queries, use it from Python, run it in production, and ship a sensor API. Every example runs against a real TimescaleDB 2.28 on PostgreSQL 17 in Docker and shows the output it actually produced.
Who it is for
Developers who know some SQL and a little Python and want to store, query and manage metrics, IoT, logs or event data that grows by the minute, without leaving PostgreSQL.
Before you start
- Basic SQL (SELECT, WHERE, GROUP BY, JOIN)
- Basic Python (functions, dictionaries, running a script)
- A laptop that can run Docker (the setup page walks you through it)
What you will be able to do
- Explain what makes time-series data different and when a hypertable beats a plain table
- Create hypertables, choose chunk intervals and load millions of rows with COPY and batched inserts
- Summarise data with time_bucket, gap filling, window functions, percentiles and anomaly queries
- Design time-series schemas with the right layout, types and indexes, and measure the cost of each choice
- Keep dashboards fast and storage small with continuous aggregates, columnstore compression and retention policies
- Read query plans, ingest from Python with psycopg, operate a database in production, and ship a Docker Compose sensor API