SkillsApr 16, 2026·3 min read

TDengine — High-Performance Time-Series Database for IoT

TDengine is a purpose-built time-series database optimized for IoT and industrial data. It delivers 10x compression and 10x query speed over general-purpose databases.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
TDengine Time-Series DB
Direct install command
npx -y tokrepo@latest install 2b6840a2-399f-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

TL;DR
Purpose-built time-series database delivering 10x compression and query speed for IoT data.
§01

What it is

TDengine is a purpose-built time-series database optimized for IoT, industrial telemetry, and monitoring data. It combines a storage engine designed for time-series patterns with built-in caching, stream processing, and data subscription in a single platform. The SQL-compatible interface means teams can adopt it without learning a new query language.

TDengine targets IoT platform teams, DevOps engineers collecting metrics, and any organization dealing with high-volume time-stamped data that outgrows general-purpose databases.

§02

How it saves time or tokens

General-purpose databases like PostgreSQL or MySQL waste storage on time-series data because they lack column-oriented compression tuned for sequential timestamps. TDengine's columnar storage with domain-specific compression achieves up to 10x better compression ratios. Queries on time ranges are also faster because the engine skips irrelevant blocks at the storage level. Built-in stream processing eliminates the need for separate Kafka or Flink pipelines for basic aggregations.

§03

How to use

  1. Start TDengine with Docker:
docker run -d -p 6030:6030 -p 6041:6041 tdengine/tdengine
  1. Connect via the CLI client:
taos
  1. Create a database and insert data:
CREATE DATABASE demo;
USE demo;
CREATE STABLE meters (ts TIMESTAMP, voltage FLOAT, current FLOAT) TAGS (location VARCHAR(64), group_id INT);
CREATE TABLE meter_01 USING meters TAGS ('factory_a', 1);
INSERT INTO meter_01 VALUES (NOW, 220.5, 1.2);
SELECT AVG(voltage) FROM meters WHERE ts > NOW - 1h GROUP BY location;
§04

Example

Using TDengine's super-table pattern for IoT devices:

-- Create a super-table (schema template)
CREATE STABLE sensors (
  ts TIMESTAMP,
  temperature FLOAT,
  humidity FLOAT
) TAGS (device_id VARCHAR(32), floor INT);

-- Auto-create sub-tables per device
INSERT INTO d_abc USING sensors TAGS ('abc', 3)
  VALUES (NOW, 23.5, 45.2);

-- Query across all devices
SELECT device_id, AVG(temperature)
FROM sensors
WHERE ts > NOW - 24h
GROUP BY device_id;
§05

Related on TokRepo

§06

Common pitfalls

  • TDengine's super-table model requires planning your tag structure upfront; poorly chosen tags lead to inefficient queries
  • The REST API (port 6041) and native protocol (port 6030) serve different use cases; use the native protocol for high-throughput ingestion
  • Cluster mode requires at least 3 nodes for data replication; single-node deployments cannot be non-disruptively expanded to clusters

Frequently Asked Questions

How does TDengine compare to InfluxDB?+

Both are time-series databases. TDengine uses a SQL interface while InfluxDB uses Flux or InfluxQL. TDengine's super-table model is unique for IoT scenarios where thousands of similar devices share a schema. InfluxDB has a larger ecosystem of integrations.

What is a super-table?+

A super-table is a schema template in TDengine. You define the columns and tags once, then TDengine automatically creates a sub-table for each unique combination of tag values. This is designed for IoT where thousands of devices share the same data structure.

Does TDengine support SQL?+

Yes. TDengine supports a SQL-compatible query language with extensions for time-series operations like downsampling, interpolation, and window functions. Most standard SQL knowledge transfers directly.

Can TDengine replace Kafka for stream processing?+

For simple aggregations and windowed computations on time-series data, TDengine's built-in stream processing can replace Kafka + a stream processor. For complex event processing or cross-system data pipelines, you will still need a dedicated streaming platform.

What client libraries are available?+

TDengine provides official client libraries for Java, Python, Go, Rust, Node.js, and C/C++. JDBC, ODBC, and REST API interfaces are also available for broader tool compatibility.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets