---
title: "The Best Databases for IoT in 2026: A Practical Comparison"
description: " Tiger Cloud, InfluxDB, QuestDB, TDengine, and more—compared on ingestion throughput, compression, SQL support, and MQTT integration for IoT workloads in 2026."
section: "Postgres for IoT"
published: 2024-08-01T11:45:45.675Z
updated: 2026-11-02T00:00:00.000Z
---

*Updated at Nov 2, 2026*

> **TimescaleDB is now Tiger Data.**

*Originally Published on Aug. 1, 2024*

This comparison covers IoT workloads in general, with a close look at high-frequency sensor data. We go deep on compression, cardinality (how many unique device and sensor series your data creates), and query patterns for vibration, temperature, and telemetry data at scale.

Your IoT database is a choice you will live with for years, and the wrong one shows up late. Maybe your InfluxDB 1.x instance starts throwing cardinality errors across a large device fleet. Or you realize you can’t join vibration readings against maintenance records without spinning up a second database. By then, undoing the damage hurts.

This article compares the most widely deployed IoT databases on four points: ingestion throughput, compression, query flexibility, and operational overhead. Use it to make the call early, before you’re three months into a schema you can’t easily undo.

## **What is the best database for sensor data?**

Tiger Cloud (PostgreSQL with the TimescaleDB extension) is the strongest fit when sensor data needs SQL joins against device, asset, location, or maintenance metadata. This pattern is common in industrial equipment monitoring, energy infrastructure, and smart-building deployments.

Sensor data compresses very well in columnar storage. [<u>Hypercore, the TimescaleDB hybrid row-columnar engine</u>](https://www.tigerdata.com/docs/reference/timescaledb/hypercore), reduces sensor-data storage by up to 98%. Named production deployments report savings between 87% and 97%: Easee (87%), Eggersmann (93%), Sakura Internet (94%), and MarketReader (97%).

## **Common sensor-data use cases**

The below scenarios often decide which database a team picks. Each one shows what a database can and cannot do under production load.

**Industrial field-equipment telemetry.** Flogistix by Flowco manages vapor recovery across roughly 3,700 pieces of field compression equipment in U.S. oil and gas fields. The fleet ingests about 100 data points per minute. After moving to Tiger Cloud, Flogistix reports 84% compression in production and a 66% reduction in infrastructure and storage costs. Read[ <u>Flogistix’s full case study on 84% compression and 66% lower infrastructure costs</u>](https://www.tigerdata.com/blog/how-flogistix-by-flowco-reduced-infrastructure-management-costs-by-66-with-tiger-data) for the architecture and outcome breakdown.

**Industrial diagnostics and digital twins.** Mechademy monitors critical oil, gas, and energy assets, covering roughly 6% of world LNG production. It uses hybrid digital twins (virtual models of physical equipment) that run continuous diagnostic tests over dense telemetry. After migrating from MongoDB, Mechademy cut infrastructure costs by 87%. It also scaled diagnostic capacity 50x, from 200,000 to 10,000,000 tests per half hour.[ <u>See how Mechademy cut infrastructure costs 87% after migrating off MongoDB</u>](https://www.tigerdata.com/blog/how-mechademy-cut-hybrid-digital-twin-infrastructure-costs).

**Predictive maintenance via vibration and pressure correlation.** The core pattern is to correlate vibration or pressure readings with an asset’s maintenance history. This surfaces equipment that is likely to need service soon. It requires joining time-ordered sensor data against structured maintenance records. In SQL, this is a natural join that runs at query time instead of as a post-processing step. For the full list of database requirements this pattern creates,[ <u>see the six technical requirements an industrial-scale IIoT database must meet</u>](https://www.tigerdata.com/learn/iiot-database-requirements).

**Smart-building and BMS sensor data.** Building management systems (BMS) track HVAC setpoints, occupancy counts, and submeter energy readings. Each stream arrives at a fairly low frequency. Across zones, floors, and assets, though, the cardinality adds up fast. The[ <u>Tiger Data Building Management System Database guide</u>](https://www.tigerdata.com/learn/building-management-system-database) covers schema and retention patterns for BMS workloads. The[ <u>Smart Building Analytics guide</u>](https://www.tigerdata.com/learn/smart-building-analytics) documents a working production pattern for anomaly detection. It uses rolling average and standard-deviation checks, computed with plain SQL window functions over continuous aggregates.

**Fleet and vehicle telemetry.** GPS coordinates, OBD-II fault codes, and CAN bus signals create high-cardinality, high-frequency time-series data at fleet scale. This data also depends heavily on relational context. Every reading must tie back to a vehicle, driver, route, and geofence record. The[ <u>Fleet Telemetry Database guide</u>](https://www.tigerdata.com/learn/fleet-telemetry-database) covers the full schema design and query approach for this workload.

## **What to look for in an IoT database**

Before comparing specific databases, here are the criteria that matter most for IoT workloads. Each one appears in the individual database profiles below.

**Ingestion throughput.** Sustained write rates (rows per second) matter more than peak latency for IoT. Most IoT devices communicate over MQTT, the dominant protocol for constrained devices and low-bandwidth networks. Whether your database integrates with MQTT brokers natively or requires an intermediary like Telegraf determines how much pipeline engineering sits between your devices and your data.

**Cardinality handling.** High-cardinality tag sets (unique device IDs, sensor serial numbers, location codes) cause index bloat in traditional time-series databases. InfluxDB's documented cardinality limitations in versions 1.x and 2.x are the most visible example of this failure mode. Any database you choose should handle millions of unique series without requiring workarounds.

**Data compression.** Sensor data compresses well because it is repetitive and predictable. When evaluating any sensor data database, compression ratios directly determine how much history you can keep online and what your storage bill looks like. Tiger Data's columnstore [<u>compression</u>](https://www.tigerdata.com/compression) achieves up to 98% size reduction in production deployments, and [<u>customer </u>](https://www.tigerdata.com/case-studies)benchmarks consistently show 87-97% compression across IoT workloads.

**Query language.** SQL vs. Flux vs. InfluxQL vs. proprietary. The developer community has a clear preference: SQL is the query language most teams already know, most tools already support, and most hires already have experience with. InfluxDB's move toward SQL in version 3.0 after deprecating Flux confirms this trend.

**Schema flexibility.** IoT devices evolve. New sensors get added, firmware updates change payload structures, device types expand. Rigid schemas break production deployments. PostgreSQL's ALTER TABLE and Tiger Data's hypertable design handle schema evolution without downtime. Some alternatives require schema redesigns when device types change.

**Retention policies and downsampling.** Raw sensor data at one-second intervals is useful for troubleshooting but expensive to store indefinitely. Tiger Data offers [<u>continuous aggregates</u>](https://www.tigerdata.com/docs/use-timescale/latest/continuous-aggregates/about-continuous-aggregates) for automatic downsampling and [<u>chunk-based retention policies</u>](https://www.tigerdata.com/docs/use-timescale/latest/data-retention/create-a-retention-policy) for rolling expiration. These are native features. Note which alternatives have equivalents and which require external tooling.

**Deployment model.** Fully managed cloud vs. self-hosted changes the operational math. [<u>Tiger Cloud</u>](https://www.tigerdata.com/cloud) handles infrastructure, backups, and upgrades. For teams running IoT at scale, the operational overhead of self-hosting a database is real engineering cost that does not appear on the sticker price.

**Ecosystem fit.** Grafana, Telegraf, Home Assistant, Node-RED. These integrations are community-driven, but they determine adoption velocity. A database that works with your existing monitoring and visualization stack saves weeks of integration work.

These criteria apply to each database profiled below.

## The Best Databases for IoT: An Overview

"Best" depends on your workload, your team's SQL expertise, and whether you need managed cloud or prefer self-hosting. A two-person startup running Home Assistant sensors has different requirements than an energy company monitoring 10,000 field devices across three continents. The comparison table below provides a starting point. The detailed profiles that follow apply the evaluation criteria from the previous section to each database individually.

| **Database** | **Best For** | **Query Language** | **Deployment** | **Open Source** |
| --- | --- | --- | --- | --- |
| Tiger Cloud | Fleet IoT, SQL teams, mixed workloads | SQL (PostgreSQL) | Managed cloud | Yes (TimescaleDB) |
| InfluxDB | InfluxDB-native stacks | InfluxQL / SQL (v3) | Cloud + self-hosted | Partially |
| QuestDB | High-throughput ingestion, OSS | SQL | Self-hosted / Enterprise BYOC | Yes |
| CrateDB | Distributed SQL, industrial | SQL | Self-hosted / cloud | Yes |
| TDengine | Industrial IoT, edge | SQL-like (TDengine SQL) | Self-hosted / edge | Yes |
| Apache IoTDB | Enterprise industrial IoT | IoTQL / SQL | Self-hosted | Yes |
| MongoDB | Document-model IoT, flexible schema | MQL | Managed + self-hosted | Partially |

Grafana Cloud and Prometheus are not databases. They are a metrics and visualization layer often deployed alongside these databases. If you arrived here from a Grafana context, you are likely looking for a backend data store. Tiger Cloud and InfluxDB both work as Grafana data sources.

**Note on AWS Timestream:** [<u>AWS Timestream LiveAnalytics was closed to new customers in June 2025</u>](https://www.tigerdata.com/learn/aws-time-series-database-understanding-your-options) and is no longer available for new IoT deployments. Amazon Timestream for InfluxDB (Amazon's managed InfluxDB service) is the surviving AWS-native time-series option.

## Tiger Cloud

Tiger Data is a managed PostgreSQL-based time-series database built on the open-source [<u>TimescaleDB</u>](https://github.com/timescale/timescaledb) extension. Full disclosure: this is our product, and this guide reflects that perspective.

**What it is:** A fully managed cloud service that extends PostgreSQL with time-series primitives. The open-source TimescaleDB extension is free for self-hosting. Tiger Cloud adds managed infrastructure, automated backups, and consumption-based pricing with independent compute and storage scaling.

**Best use case:** Fleet-scale IoT where SQL joins across device metadata are required. Energy and utilities telemetry. Any team that wants to avoid managing database infrastructure while keeping full SQL and PostgreSQL ecosystem access.

**IoT-specific features:**

- **Hypertables** partition sensor data by time automatically. You create a standard PostgreSQL table, convert it to a hypertable, and TimescaleDB handles chunk management under the hood. Queries stay bounded as data grows.
- [**<u>Continuous aggregates</u>**](https://www.tigerdata.com/docs/use-timescale/latest/continuous-aggregates/about-continuous-aggregates) pre-compute rollups for dashboard queries. Instead of re-scanning millions of raw sensor readings for "average temperature over the last 7 days by device," the aggregate updates incrementally. Hierarchical continuous aggregates let you build hourly rollups from raw data, then daily rollups from the hourly layer.
- **Columnstore compression** achieves up to 98% size reduction for sensor data. 
- [**<u>Chunk-based data retention</u>**](https://www.tigerdata.com/docs/use-timescale/latest/data-retention/create-a-retention-policy) drops data older than a configured threshold automatically. No manual cleanup scripts.
- [**<u>Tiered storage</u>**](https://docs2.tigerdata.com/docs/build/data-management/storage/manage-storage) moves older chunks to low-cost object storage while keeping them queryable via SQL.

**MQTT ingestion path:** The most common production pipeline is Telegraf with the MQTT Consumer input plugin writing to Tiger Cloud via the PostgreSQL output or InfluxDB line protocol. Telegraf is the de facto IoT ingestion standard (InfluxData built it; it works equally well with Tiger Cloud). For a detailed implementation guide, see [<u>From MQTT to SQL: A Practical Guide to Sensor Data Ingestion</u>](https://www.tigerdata.com/blog/mqtt-sql-practical-guide-sensor-data-ingestion).

**Production IoT customers:** Energy and telemetry companies including NextEra, Octave, Easee, and Flogistix run Tiger Data in production for [<u>fleet-scale sensor monitoring</u>](https://www.tigerdata.com/energy-telemetry).

**Strengths:** Full SQL with JOINs across device metadata and sensor readings in a single query. PostgreSQL ecosystem access (pgvector for ML pipelines, PostGIS for location data). No schema migration pain. Managed operations. Mutable time-series data (updates and deletes work, unlike write-once databases).

**Limitations:** Not the best choice if your team is deeply invested in InfluxDB-native tooling with no SQL expertise and no plans to migrate. Cloud-first. Teams requiring air-gapped on-premises deployment should evaluate the open-source TimescaleDB path separately.

## InfluxDB

**Version fragmentation is the first thing to understand.** InfluxDB 1.x, 2.x, and 3.0 are architecturally different products. Cloud Serverless and Cloud Dedicated are separate offerings. Teams migrating between versions should research compatibility carefully before committing.

**What it is:** A purpose-built time-series database owned by InfluxData. 

**Pricing:** Open core. Cloud Serverless and Cloud Dedicated available. Self-hosted options exist for older versions.

**Query language:** InfluxQL for 1.x. Flux for 2.x (now being deprecated). SQL support in 3.0.

**Best use case:** Teams already running InfluxDB 1.x or 2.x where migration cost outweighs the benefits of switching. Telegraf-native pipelines tightly coupled to InfluxDB-specific inputs.

**Strengths:** Strong brand recognition. The Telegraf ecosystem is the largest collection of input plugins for data collection, and it works with most databases on this list (not just InfluxDB). MQTT Telegraf plugins are well-maintained. Large community. Strong documentation.

**Limitations:** Cardinality limits in 1.x and 2.x are well-documented. Community reports significant performance degradation at high unique tag cardinalities, which is a direct problem for IoT workloads where every device has a unique ID. Flux created a skills silo and is now being deprecated. InfluxDB 3.0 is a substantial rewrite, and migration from 2.x is non-trivial. Data deletion is difficult in older versions, which is a credibility issue for IoT workloads that require GDPR compliance or data corrections. No native JOIN across device metadata tables.

InfluxDB is a legitimate choice for teams already using it. The limitations above are trade-offs, not disqualifications. For a deeper technical comparison, see [<u>TimescaleDB vs. InfluxDB</u>](https://www.tigerdata.com/blog/timescaledb-vs-influxdb-for-time-series-data-timescale-influx-sql-nosql-36489299877).

## QuestDB

**What it is:** An open-source SQL time-series database from QuestDB with a column-oriented storage engine built for high-throughput ingestion.

**Pricing:** Open-source self-hosted. QuestDB Enterprise is available as a BYOC (Bring Your Own Cloud) managed option. The previous QuestDB Cloud managed service has been discontinued.

**Query language:** Standard SQL with time-series extensions. No proprietary query language.

**Best use case:** Teams prioritizing raw ingestion speed and open-source self-hosting. QuestDB has a strong tutorial ecosystem for MQTT, Raspberry Pi, and Arduino projects, making it a solid entry point for IoT prototyping and smaller deployments.

**Strengths:** QuestDB publishes competitive ingestion benchmarks, and community reports suggest it performs well at high write rates. SQL-native from the start, so there is no query language migration path to worry about. Clean API. Good developer experience.

**Limitations:** Smaller ecosystem than InfluxDB or Tiger Data. No native JOIN to external metadata sources without extension work, which means joining sensor readings with device metadata requires application-level logic or a second database. The Enterprise BYOC model requires more operational involvement than a fully managed service like Tiger Cloud or InfluxDB Cloud. Community size is smaller.

## CrateDB

**What it is:** A distributed SQL database from CrateDB with PostgreSQL wire-protocol compatibility, targeting IoT and machine data at scale.

**Pricing:** Open-source self-hosted. CrateDB Cloud (managed) available.

**Query language:** Standard SQL.

**Best use case:** Distributed IoT workloads where horizontal sharding across multiple nodes is a hard requirement. Industrial and manufacturing use cases with large datasets spread across regions.

**Strengths:** Distributed-first architecture. Horizontal scaling works without deep operator expertise. PostgreSQL-compatible SQL means teams familiar with PostgreSQL can get started quickly. Handles very large datasets across nodes. Good fit for multi-region industrial deployments.

**Limitations:** PostgreSQL compatibility is not complete. Some PostgreSQL features and extensions (including pgvector for ML pipelines and PostGIS for location data) are not available. Tiger Data's continuous aggregates and columnstore compression have no CrateDB equivalent. The ecosystem and documentation depth are below InfluxDB or Tiger Data. CrateDB published a fresh IoT comparison in February 2026 and is gaining SERP presence, but community traction remains limited.

## TDengine

**What it is:** An open-source database from TDengine explicitly targeting Industrial IoT and edge computing deployments. Chinese enterprise origin, which is context rather than a disqualifier. TDengine has a growing international presence.

**Pricing:** Open source + enterprise edition.

**Query language:** TDengine SQL, a SQL dialect that covers most common operations but is not ANSI SQL-compliant.

**Best use case:** Industrial IoT with native MQTT and OPC UA protocol support. Edge computing deployments where data needs to be processed locally before syncing to a central database. Manufacturing, energy, and utilities at the protocol level.

**Strengths:** Native MQTT and OPC UA support without requiring an intermediary. Built-in edge-to-cloud replication. The "supertable" concept handles high-cardinality device data by defining a template schema that each device inherits. Explicit IIoT design throughout.

**Limitations:** Smaller Western ecosystem. TDengine SQL is not standard SQL, which means existing PostgreSQL or MySQL tooling does not transfer directly. Fewer integrations with Western observability tooling. Grafana integration exists but is less mature than Tiger Data's or InfluxDB's PostgreSQL/InfluxDB data source plugins. Enterprise support model is less established outside of Asia.

## Apache IoTDB

**What it is:** An Apache Software Foundation project. Enterprise-grade open-source time-series database designed specifically for Industrial IoT.

**Pricing:** Open source. Enterprise support available via commercial vendors.

**Query language:** IoTQL and SQL.

**Best use case:** Large-scale enterprise industrial deployments in manufacturing, utilities, and transportation. Organizations that require Apache governance and open-source provenance for procurement or compliance.

**Strengths:** Apache Software Foundation governance provides a credibility signal for enterprise procurement. Handles very large-scale enterprise industrial data. Active development. Strong adoption in Chinese manufacturing and energy enterprises.

**Limitations:** Steep learning curve. IoTQL is non-standard, so existing SQL skills do not transfer directly. Western community and documentation are smaller than alternatives on this list. Operational complexity for self-hosting is higher than managed alternatives.

## When to consider MongoDB or other general-purpose databases

Not every IoT project needs a purpose-built time-series database.

**MongoDB works when:** IoT data payloads are heavily document-oriented with irregular, schema-flexible structures. The team already has MongoDB expertise. Query patterns are document-retrieval-first rather than time-range aggregation-first. Write volume is moderate (hundreds of rows per second, not millions).

**MongoDB struggles when:** Write throughput exceeds hundreds of thousands of rows per second. Retention compression is critical for cost control. Time-range queries and aggregations dominate the access pattern. These workloads push MongoDB beyond its design center.

**A note on Prometheus and Grafana:** These are monitoring and visualization tools, not IoT databases. Developers who arrived here from a Grafana context are looking for a backend data store. Tiger Cloud and InfluxDB both connect to Grafana as data sources. Tiger Data uses the PostgreSQL data source plugin, which works with Grafana's time-series panel types out of the box.

## MQTT and IoT database ingestion

MQTT (Message Queuing Telemetry Transport) is a lightweight publish-subscribe protocol designed for constrained devices and low-bandwidth networks. It is the dominant protocol for IoT sensor data transmission. Devices publish to topics; a broker (Mosquitto, EMQX, HiveMQ) receives the messages; a subscriber writes the data to the database.

Getting MQTT data into your database is a solved problem, but the specific path varies by database.

**Telegraf pattern (most common).** Telegraf's MQTT Consumer input plugin subscribes to your MQTT broker topics, parses payloads, batches messages, and writes to Tiger Cloud via the PostgreSQL output plugin or InfluxDB line protocol. This is the most battle-tested path for production IoT. Telegraf handles connection management, buffering, and retry logic. The MQTT + Telegraf + Tiger Cloud stack is used in production by [<u>energy telemetry customers</u>](https://www.tigerdata.com/energy-telemetry) and is a supported path. For a step-by-step implementation guide, see [<u>From MQTT to SQL</u>](https://www.tigerdata.com/blog/mqtt-sql-practical-guide-sensor-data-ingestion).

**Direct subscription pattern.** Application code subscribes to the MQTT broker, parses payloads, and writes via a PostgreSQL client library. More flexible than Telegraf, but you own connection management, buffering, and error handling.

**Which databases have native MQTT support:**

- **TDengine** has built-in MQTT and OPC UA connectors. No intermediary required.
- **InfluxDB** uses Telegraf (built by InfluxData) as its primary MQTT ingestion path.
- **Tiger Cloud, QuestDB, CrateDB** all use Telegraf or direct subscription. No native MQTT broker integration.

EMQX deserves a mention as the MQTT broker vendor with the strongest documentation for database integration. If you are evaluating MQTT brokers alongside databases, EMQX publishes integration guides for most databases on this list.

## IoT data retention and compression

At one-second intervals, a single sensor generates roughly 86,400 rows per day. A fleet of 10,000 sensors generates approximately 864 million rows per day. Uncompressed, this becomes a storage cost problem within weeks.

Three retention strategies handle this at production scale:

**Chunk-based expiration.** Drop data older than a configured threshold automatically. Tiger Data's hypertables support this natively via [<u>retention policies</u>](https://www.tigerdata.com/docs/use-timescale/latest/data-retention/create-a-retention-policy). Set a policy once, and chunks older than your retention window are dropped on schedule. No cron jobs, no cleanup scripts.

**Continuous aggregates plus raw drop.** The most common production pattern for dashboard-heavy IoT applications. Keep one-minute or one-hour rollups indefinitely via [<u>continuous aggregates</u>](https://www.tigerdata.com/docs/use-timescale/latest/continuous-aggregates/about-continuous-aggregates). Drop raw data after 30-90 days. Dashboards query the aggregates for "average temperature over the last 7 days by device" without scanning millions of raw rows.

**Tiered storage.** Keep recent data in high-performance storage. Move older chunks to low-cost object storage automatically while keeping them queryable via SQL. Tiger Cloud supports this through its [<u>tiered storage architecture</u>](https://docs2.tigerdata.com/docs/build/data-management/storage/manage-storage).

**Compression comparison across databases:** Tiger Data's columnstore compression achieves up to 98% size reduction for repetitive sensor data, with production IoT customers consistently reporting 87-97% compression ratios. InfluxDB's TSM compression is effective, but cardinality limits in 1.x and 2.x can force data restructuring that offsets compression gains. QuestDB uses columnar storage with competitive compression. CrateDB's compression is adequate for most workloads but lacks the continuous aggregate equivalent for reducing query load on rolled-up data.

For dashboards querying historical sensor data, continuous aggregates eliminate the need to scan raw data. The aggregate pre-computes the result, updates incrementally as new data arrives, and returns query results in milliseconds rather than seconds.

## Decision framework: How to choose

### Choose Tiger Cloud if:

- Your team knows SQL and wants to avoid learning a proprietary query language
- Sensor data needs to JOIN with device metadata, user accounts, or location data in the same query
- You need a fully managed cloud service with committed SLAs and no database ops overhead
- You are building a telemetry database for fleet operations, energy monitoring, or industrial equipment where compression and long-term retention are priorities
- You want one database for time-series data, vector search (pgvector), and relational data
- Your team is building on PostgreSQL already and wants to add time-series capability without changing the stack

### Choose InfluxDB if:

- Your team is already running InfluxDB 1.x or 2.x and migration cost outweighs the benefits
- The pipeline is Telegraf-native and tightly coupled to InfluxDB-specific inputs
- You are evaluating InfluxDB 3.0 and want to stay within the InfluxData ecosystem
- SQL is not yet a priority (though InfluxDB 3.0 is moving toward SQL)

### Choose QuestDB if:

- Maximum ingestion throughput is the primary requirement
- The team wants open-source self-hosted without vendor lock-in
- SQL is required but fully managed cloud is not a priority (QuestDB Enterprise uses a BYOC model)
- Budget is constrained and open-source licensing matters

### Choose TDengine if:

- The workload is Industrial IoT with native MQTT or OPC UA at the edge
- Edge-to-cloud replication is a hard requirement
- The team is comfortable with TDengine SQL and a less Western-centric ecosystem

### Choose Apache IoTDB if:

- Apache Software Foundation governance is a procurement or compliance requirement
- The scale is enterprise industrial (manufacturing, utilities, transportation)
- The team has resources for operational complexity and a longer learning curve

### Choose a general-purpose database (MongoDB, PostgreSQL without TimescaleDB) if:

- IoT payloads are heavily irregular and document-oriented, making column schemas difficult
- Write throughput is low (hundreds of rows per second, not millions)
- The team has deep existing expertise in the general-purpose database and IoT time-series is a secondary use case

## Migrating to Tiger Cloud from a legacy historian or TSDB

Migrations are a real pain point for industrial IoT teams. Here are the four most common paths.

**From InfluxDB (1.x or 2.x).** Telegraf can write simultaneously to InfluxDB and Tiger Cloud during a parallel run. Schema mapping from InfluxDB measurements and tags to hypertable columns requires planning. This is not an automatic conversion. The InfluxDB line protocol is supported by Tiger Cloud, which simplifies the ingestion side.

**From OSIsoft PI or Wonderware (legacy historians).** These are OPC UA-native systems. TDengine and Apache IoTDB have native OPC UA connectors. Tiger Cloud requires an intermediary: Telegraf with the OPC UA input plugin, or a custom bridge. This is a real engineering effort, not a weekend migration. Plan accordingly.

**From PostgreSQL (without TimescaleDB).** The simplest migration path. Existing tables can be converted to hypertables. Schema and data stay in place. The main change is configuring the time-based partitioning strategy and enabling compression.

**From MongoDB.** Requires schema design work to move from the document model to a relational/time-series schema. Worth doing if write throughput is becoming a bottleneck or time-range queries are slow, but it is not trivial.

For enterprise migration planning, see Tiger Data's [<u>migration documentation</u>](https://www.tigerdata.com/docs/use-timescale/latest/migrate) and the [<u>energy and telemetry page</u>](https://www.tigerdata.com/energy-telemetry) for production deployment references.

## **How to query sensor data at scale**

Once sensor data is flowing in, three query patterns come up most in production. You retrieve the current reading per device, aggregate over time windows, and join readings to asset or maintenance tables.

**Last-known-value lookups.** The most frequent operational question in a sensor fleet is what each device is reading right now. `DISTINCT ON` over an ordered hypertable returns one row per device. You need no subquery or window function.

`-- Most recent reading per device
SELECT DISTINCT ON (device_id)
  device_id, time, value
FROM sensor_readings
WHERE time > now() - interval '1 day'
ORDER BY device_id, time DESC;`

The time filter lets TimescaleDB use chunk exclusion. The query skips older chunks and scans only the recent ones, so latency stays predictable as the dataset grows.

**Time-window aggregation with continuous aggregates.** Dashboards and trend analysis get expensive fast if every query recomputes its aggregates. Continuous aggregates are materialized views that TimescaleDB maintains incrementally. They refresh on a schedule and pre-compute rollups, so historical reads return instantly. With real-time aggregation enabled, a query also adds the rows that arrived since the last refresh.

`CREATE MATERIALIZED VIEW vibration_hourly
WITH (timescaledb.continuous) AS
SELECT
  asset_id,
  time_bucket('1 hour', time) AS bucket,
  avg(vibration_mm_s) AS avg_vibration
FROM sensor_readings
GROUP BY asset_id, bucket;`

`time_bucket()` does the core time-series work here. It groups readings into fixed-width intervals, from microseconds to months, with optional timezone alignment.

**Metadata joins.** Tiger Cloud supports full SQL joins, which TDengine and Apache IoTDB handle only in limited form. You can join sensor readings to asset records, location tables, or maintenance logs in a single query. This is standard SQL on PostgreSQL. It needs no ETL step, no secondary lookup, and no eventual consistency between systems.

`SELECT r.asset_id, r.time, r.value, a.location, a.last_maintenance_date
FROM sensor_readings r
JOIN assets a ON r.asset_id = a.asset_id
WHERE r.time > now() - interval '1 hour';`

For predictive maintenance, this join returns each reading together with the context that decides whether it needs action.

## **Choosing the right IoT database**

You need to answer one question before you evaluate any vendor. Does your workload need to join sensor readings against structured metadata? If it does, you need a database with full SQL join support. Tiger Cloud (PostgreSQL with the TimescaleDB extension) is a production-tested option for that pattern. If your workload is pure ingestion with no relational requirements, InfluxDB or QuestDB might serve you well.

Named production deployments report 87% to 97% reductions in raw storage footprint. Mechademy gained 50x diagnostic capacity after migrating from MongoDB. These figures give you concrete benchmarks to frame your own infrastructure cost conversation. Your results will depend on schema design, batch size, and hardware.

[<u>Try Tiger Cloud</u>](https://www.tigerdata.com/cloud) to run your own benchmark against a production-representative dataset. Or read the[ <u>IIoT database requirements guide</u>](https://www.tigerdata.com/learn/iiot-database-requirements) to work through the six technical criteria before you commit to a schema.

## **FAQ about IoT databases**

### What is the best database for IoT sensor data?

The deciding factor is whether you need SQL joins against device or asset metadata. If your workload correlates sensor readings with equipment records, maintenance history, or location data, which is common in industrial, energy, and building management deployments, Tiger Cloud (built on PostgreSQL with the TimescaleDB extension) is the strongest fit. Teams already standardized on InfluxDB, or running pure ingestion workloads with no relational requirements, will get better results from InfluxDB or QuestDB. See the direct-answer section earlier on this page for the full breakdown and at-a-glance comparison table.

### Can I use PostgreSQL for IoT data?

Yes. PostgreSQL with the TimescaleDB extension (the basis of Tiger Data) is a well-established pattern for IoT. The Home Assistant community has broad adoption of the TimescaleDB + PostgreSQL + Grafana stack for sensor logging. Standard PostgreSQL without TimescaleDB works at low volumes but shows performance degradation at high write rates and large data volumes. See [<u>Storing IoT Data: 8 Reasons Why You Should Use PostgreSQL</u>](https://www.tigerdata.com/blog/storing-iot-data-why-you-should-use-postgresql) for the full technical case.

### What database does MQTT use?

MQTT is a protocol, not a database. It handles message transport from devices to a broker. The broker (Mosquitto, EMQX, HiveMQ) then needs to write to a database. Telegraf is the most common bridge: it subscribes to the MQTT broker and writes to Tiger Cloud, InfluxDB, QuestDB, or other targets via configured output plugins.

### Is InfluxDB good for IoT?

InfluxDB is a common choice for IoT, particularly for teams already using Telegraf. However, InfluxDB has documented cardinality limitations in versions 1.x and 2.x, Flux (the 2.x query language) is being deprecated, and InfluxDB 3.0 is a significant rewrite with a non-trivial migration path from 2.x. Teams evaluating InfluxDB for new deployments should research the version differences carefully before committing.

### What is the best open-source database for IoT?

QuestDB and TimescaleDB (the open-source project underlying Tiger Data) are the two strongest options. QuestDB optimizes for ingestion throughput with SQL. TimescaleDB optimizes for compression, continuous aggregates, and SQL compatibility with the full PostgreSQL ecosystem. TDengine and Apache IoTDB are strong options for Industrial IoT specifically.

### How do I store MQTT data in a database?

The most common production pattern is: MQTT broker (Mosquitto or EMQX) to Telegraf (MQTT Consumer input plugin) to your database (Tiger Cloud, InfluxDB, QuestDB). Telegraf handles topic subscription, payload parsing, and batched writes. For teams that want more control, direct MQTT subscription in application code writing via a PostgreSQL or HTTP client is also viable. See [<u>From MQTT to SQL: A Practical Guide to Sensor Data Ingestion</u>](https://www.tigerdata.com/blog/mqtt-sql-practical-guide-sensor-data-ingestion) for the full implementation walkthrough.

### How do I handle IoT data retention without exploding storage costs?

The standard pattern is a two-tier strategy: keep raw data for 30-90 days (depending on compliance requirements), maintain continuous aggregates (hourly or daily rollups) indefinitely, and drop raw chunks on a rolling schedule. Tiger Data's [<u>retention policies</u>](https://www.tigerdata.com/docs/use-timescale/latest/data-retention/create-a-retention-policy) and [<u>continuous aggregates</u>](https://www.tigerdata.com/docs/use-timescale/latest/continuous-aggregates/about-continuous-aggregates) automate this. For longer-term cost reduction, [<u>tiered storage</u>](https://docs2.tigerdata.com/docs/build/data-management/storage/manage-storage) moves older chunks to object storage automatically.

### What is the best database for Industrial IoT (IIoT)?

TDengine and Apache IoTDB are both built explicitly for IIoT with native OPC UA and MQTT support. Tiger Data is a strong choice for IIoT teams that prioritize SQL, cloud-managed operations, and integration with analytics tools. Energy and utilities companies including NextEra and Easee run Tiger Data in production. The choice depends on whether protocol-native edge capabilities (TDengine, IoTDB) or SQL analytics depth (Tiger Data) is the primary requirement.

### Can I use MongoDB for IoT?

MongoDB works for IoT when data payloads are document-oriented and irregular, write volume is moderate, and the team is already on MongoDB. It is not well-suited for high-frequency time-series ingestion, compression-critical retention, or time-range aggregation queries at scale. Teams hitting MongoDB performance limits on IoT workloads typically migrate to a purpose-built TSDB. For a deeper comparison, see [<u>How to Store Time-Series Data in MongoDB and Why That's a Bad Idea</u>](https://www.tigerdata.com/blog/how-to-store-time-series-data-mongodb-vs-timescaledb-postgresql-a73939734016).

### Can PostgreSQL handle millions of sensor writes per second?

PostgreSQL with the TimescaleDB extension, the foundation of Tiger Cloud, is built for high-frequency time-series ingestion and runs in production at fleet scale. Flogistix by Flowco, for example, ingests approximately 100 data points per minute across roughly 3,700 pieces of field compression equipment with no throughput issues at that volume. Exact sustained-write ceilings depend on hardware configuration, schema design, batch size, and compression settings, so benchmark against your specific workload rather than relying on a flat ceiling number.

### What's the best database for storing sensor data used in predictive maintenance?

Tiger Cloud's primary approach for predictive maintenance is time-bucketed rollups via continuous aggregates, with anomaly detection handled through lightweight statistical checks. Readings that fall outside a rolling average plus or minus a standard deviation threshold are computed with plain SQL window functions. The [<u>Smart Building Analytics guide</u>](https://www.tigerdata.com/learn/smart-building-analytics) documents exactly this pattern running in production. For more advanced workloads, pgvector can complement this approach by enabling pattern-similarity search over vector embeddings of sensor windows, useful for identifying equipment signatures that resemble known failure modes, though that is a supplementary technique rather than the primary anomaly-detection mechanism.

### Which database handles high-cardinality sensor data without a cardinality ceiling?

Tiger Cloud (PostgreSQL with the TimescaleDB extension) handles high-cardinality device and sensor ID sets without the index-bloat failure mode that InfluxDB 1.x and 2.x are documented to hit as the number of unique tag combinations grows. PostgreSQL's B-tree indexes scale with cardinality in a predictable, well-understood way. For the deeper technical treatment of how to structure schemas and indexes for high-cardinality time-series data, see Tiger Data's [<u>How to Handle High-Cardinality Data in PostgreSQL</u>](https://www.tigerdata.com/learn/how-to-handle-high-cardinality-data-in-postgresql) guide.

### Is InfluxDB or TimescaleDB better for sensor data?

It depends on whether you need relational joins. InfluxDB fits teams already standardized on its ecosystem, working with pure time-series workloads that don't require joining sensor readings to device metadata or maintenance records. TimescaleDB (and Tiger Cloud, the managed service built on it) fits teams that need SQL joins against structured asset data, want to stay in the PostgreSQL ecosystem, or are running workloads where the sensor readings are only useful alongside location, equipment type, or service history. For the full technical comparison, see Tiger Data's [<u>TimescaleDB vs. InfluxDB comparison</u>](https://www.tigerdata.com/blog/timescaledb-vs-influxdb-for-time-series-data-timescale-influx-sql-nosql-36489299877).

### How do I store high-frequency sensor data efficiently?

Three mechanisms work together in production. Chunk-based retention policies expire raw data after a defined window, continuous aggregates preserve downsampled rollups after the raw data is dropped, and tiered storage offloads older data to low-cost object storage while keeping it fully queryable via SQL. Compression via Hypercore's columnstore handles the storage cost at the row level, since sensor data's repetitive numeric patterns compress exceptionally well, with named production deployments reporting 87–97% reduction in raw storage footprint. The IoT Data Retention and Compression section earlier on this page covers all three mechanisms in detail.

### Does Tiger Data support Grafana?

Yes. Tiger Data connects to Grafana via the PostgreSQL data source plugin. This is the same plugin used by the Home Assistant community's TimescaleDB + Grafana setup. Dashboards query Tiger Cloud via standard SQL, and time-series panel types work with Tiger Data's time-indexed hypertable schema.

### What is a hypertable?

A hypertable is Tiger Data's (and TimescaleDB's) core abstraction for time-series data. It is a standard PostgreSQL table that is automatically partitioned by time under the hood. From a query perspective, it behaves like a regular table. SQL queries work unchanged. The partitioning enables fast time-range queries, efficient chunk-level compression, and chunk-based retention policies without manual partition management.

*Tiger Data is the company behind TimescaleDB, the open-source PostgreSQL extension for time-series data. *[*<u>Try Tiger Cloud free</u>*](https://www.tigerdata.com/cloud)* or explore the *[*<u>best time-series databases compared</u>*](https://www.tigerdata.com/learn/the-best-time-series-databases-compared)* for a broader comparison beyond IoT.*
