Time-series databases
What is a Time-series Database?
A time-series database (TSDB) is a specialized type of database optimized for storing and retrieving data points that change over time.
In the context of Factry Historian, it is the storage engine used to record measurements, calculations, and other values with timestamps.
Unlike general-purpose databases (which typically store relational data), a time-series database is designed to efficiently handle high-volume, time-ordered data for both data ingestion and data retrieval.
Why does it matter?
Industrial systems generate large amounts of time-stamped data: temperatures, speeds, pressures, energy usage, setpoints, alerts, and more.
A time-series database makes it possible to:
- Store these values at high frequency and scale
- Query them quickly over time ranges
- Downsample and aggregate data for visualizations and reporting
- Retain long-term history without performance loss
Without a proper TSDB, querying process data over weeks, months, or years would be slow or even infeasible.
How does it fit in the system?
Factry Historian uses a time-series database under the hood to store all dynamic data. This includes:
- Raw Measurements collected by Collectors
- Calculated values generated with Calculations
- Data quality indicators and timestamps
- Internal statistics about Historian's performance
Each value stored has at minimum:
- A timestamp
- A measurement name
- A value
- Optionally, tags or metadata (such as a quality flag, tags & labels)
The time-series database is tightly integrated into the Historian and is typically not accessed directly by users. Instead, users interact with the data through dashboards using the Factry Historian Datasource plugin for Grafana, and the REST APIs.
Support for Multiple Time-Series Databases
Factry Historian supports configuring multiple TSDB backends, which gives you flexibility depending on your infrastructure and use case.
Currently supported:
- InfluxDB v1.x
- InfluxDB v2.x
You can configure Factry Historian to write Measurements or Calculations to different databases. This setup allows you to optimize for performance, retention, or compatibility with other tools.
Support for additional TSDBs is planned in future releases.
Example
You collect the following values from a flow meter every second:
Timestamp | Measurement | Value |
|---|---|---|
2025-08-13 08:00:01 | FlowRate | 342.5 |
2025-08-13 08:00:02 | FlowRate | 341.8 |
2025-08-13 08:00:03 | FlowRate | 343.0 |
These values are stored in the time-series database and can later be used in visualizations, KPIs, event detection, or reporting.
When you use it
As a user, you typically don't directly interact with the time-series database. Instead, you use its data through:
- Dashboards and trend views
- Historical analysis tools
- APIs and data exports
- Calculations that process values over time
Understanding the role of the TSDB helps in interpreting system behavior, especially regarding data retention, aggregation, or performance.
Common misconceptions
- The TSDB is not a general-purpose database. It is optimized for sequential data and efficient reads over time windows.
- Although you can store arbitrary metadata as tags, this has several disadvantages. See Tags & Labels.
- Each measurement is stored in a format that favors write performance and time-based queries, not complex joins.
Best practices
- Retrieve data through the Factry Historian REST API, and not directly through the underlying database.
- Avoid unnecessarily high storage frequency, and collect only what you need.
- Use aggregations and downsampling where appropriate to reduce query load.
More information
- Creating a time series database connectionCreating a time series database connection
- Updating or deleting a time series database connectionUpdating or deleting a time series database connection